summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_service_tftp-server.py
diff options
context:
space:
mode:
Diffstat (limited to 'smoketest/scripts/cli/test_service_tftp-server.py')
-rwxr-xr-xsmoketest/scripts/cli/test_service_tftp-server.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_service_tftp-server.py b/smoketest/scripts/cli/test_service_tftp-server.py
index 99d81e203..642b6af88 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,14 @@ 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)
+ print(tmp)
+ if tmp: break
+ sleep(1)
+ self.assertTrue(tmp)
self.cli_delete(base_path)
self.cli_commit()
@@ -140,7 +148,13 @@ class TestServiceTFTPD(VyOSUnitTestSHIM.TestCase):
self.assertIn('--create --umask 000', config)
# Check for process in VRF
- tmp = cmd(f'ip vrf pids {vrf}')
+ count = 0
+ while count < 10:
+ count += 1
+ tmp = cmd(f'ip vrf pids {vrf}')
+ print(tmp)
+ if tmp: break
+ sleep(1)
self.assertIn(PROCESS_NAME, tmp)
# delete VRF