diff options
author | Christian Breunig <christian@breunig.cc> | 2023-02-05 21:14:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-05 21:14:13 +0100 |
commit | 0a5579b84d7c4280fe429bd45a70482a83b8d887 (patch) | |
tree | e0098ff7cb825ba42a8ba7aa0e731fb6275a4716 /smoketest | |
parent | 3eb77660f6bb188187856d0ea74c338031fdad26 (diff) | |
parent | c6016db17ef52a0174e45267dd7f10cf7e4a2ef0 (diff) | |
download | vyos-1x-0a5579b84d7c4280fe429bd45a70482a83b8d887.tar.gz vyos-1x-0a5579b84d7c4280fe429bd45a70482a83b8d887.zip |
Merge pull request #1801 from c-po/fix-tftp-smoketest
smoketest: tftp: T4012: add busy waiting loop when validating service availability
Diffstat (limited to 'smoketest')
-rwxr-xr-x | smoketest/scripts/cli/test_service_tftp-server.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/smoketest/scripts/cli/test_service_tftp-server.py b/smoketest/scripts/cli/test_service_tftp-server.py index 99d81e203..122d66d8c 100755 --- a/smoketest/scripts/cli/test_service_tftp-server.py +++ b/smoketest/scripts/cli/test_service_tftp-server.py @@ -18,6 +18,7 @@ import unittest from psutil import process_iter from base_vyostest_shim import VyOSUnitTestSHIM +from time import sleep from vyos.configsession import ConfigSessionError from vyos.util import cmd @@ -51,7 +52,13 @@ class TestServiceTFTPD(VyOSUnitTestSHIM.TestCase): def tearDown(self): # Check for running process - self.assertTrue(process_named_running(PROCESS_NAME)) + count = 0 + while count < 10: + count += 1 + tmp = process_named_running(PROCESS_NAME) + if tmp: break + sleep(1) + self.assertTrue(tmp) self.cli_delete(base_path) self.cli_commit() |