From 1ce9c0faed60f869724aa3f5587f9a6fb321c3c2 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Wed, 8 Dec 2021 16:44:03 -0800 Subject: [PATCH] Add sleep 1 after killing/suspending a process So that it's more likely to actually deliver the message --- bindings/python/tests/fdbcli_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/python/tests/fdbcli_tests.py b/bindings/python/tests/fdbcli_tests.py index f971a1d0b6..9f8eb84a50 100755 --- a/bindings/python/tests/fdbcli_tests.py +++ b/bindings/python/tests/fdbcli_tests.py @@ -188,7 +188,7 @@ def kill(logger): # and then specify the certain process to kill process = subprocess.Popen(command_template[:-1], stdin=subprocess.PIPE, stdout=subprocess.PIPE, env=fdbcli_env) # - output2, err = process.communicate(input='kill; kill {}\n'.format(address).encode()) + output2, err = process.communicate(input='kill; kill {}; sleep 1\n'.format(address).encode()) logger.debug(output2) # wait for a second for the cluster recovery time.sleep(1) @@ -218,7 +218,7 @@ def suspend(logger): logger.debug("Pid: {}".format(pid)) process = subprocess.Popen(command_template[:-1], stdin=subprocess.PIPE, stdout=subprocess.PIPE, env=fdbcli_env) # suspend the process for enough long time - output2, err = process.communicate(input='suspend; suspend 3600 {}\n'.format(address).encode()) + output2, err = process.communicate(input='suspend; suspend 3600 {}; sleep 1\n'.format(address).encode()) # the cluster should be unavailable after the only process being suspended assert not get_value_from_status_json(False, 'client', 'database_status', 'available') # check the process pid still exists