From 9704f760831537e68b4aaf523d2f7a507eb89591 Mon Sep 17 00:00:00 2001 From: Remy Roy <303593+remyroy@users.noreply.github.com> Date: Tue, 28 May 2024 12:53:20 -0400 Subject: [PATCH] Make sure to wait for the process to exit to prevent some races --- test_binary_btec_script.py | 2 ++ test_binary_deposit_script.py | 2 ++ test_btec_script.py | 2 ++ test_deposit_script.py | 2 ++ tests/test_cli/test_existing_mnemonic.py | 2 ++ tests/test_cli/test_new_mnemonic.py | 4 ++++ 6 files changed, 14 insertions(+) diff --git a/test_binary_btec_script.py b/test_binary_btec_script.py index 6fb92d32..8850eca0 100755 --- a/test_binary_btec_script.py +++ b/test_binary_btec_script.py @@ -61,6 +61,8 @@ async def main(argv): assert len(seed_phrase) > 0 + await proc.wait() + # Check files validator_keys_folder_path = os.path.join(my_folder_path, DEFAULT_VALIDATOR_KEYS_FOLDER_NAME) _, _, key_files = next(os.walk(validator_keys_folder_path)) diff --git a/test_binary_deposit_script.py b/test_binary_deposit_script.py index e041d0aa..b5757750 100755 --- a/test_binary_deposit_script.py +++ b/test_binary_deposit_script.py @@ -57,6 +57,8 @@ async def main(argv): assert len(seed_phrase) > 0 + await proc.wait() + # Check files validator_keys_folder_path = os.path.join(my_folder_path, DEFAULT_VALIDATOR_KEYS_FOLDER_NAME) _, _, key_files = next(os.walk(validator_keys_folder_path)) diff --git a/test_btec_script.py b/test_btec_script.py index 6e6e22b7..11d21816 100755 --- a/test_btec_script.py +++ b/test_btec_script.py @@ -66,6 +66,8 @@ async def main(): assert len(seed_phrase) > 0 + await proc.wait() + # Check files validator_keys_folder_path = os.path.join(my_folder_path, DEFAULT_VALIDATOR_KEYS_FOLDER_NAME) _, _, key_files = next(os.walk(validator_keys_folder_path)) diff --git a/test_deposit_script.py b/test_deposit_script.py index 66317aa5..43dfdeee 100755 --- a/test_deposit_script.py +++ b/test_deposit_script.py @@ -62,6 +62,8 @@ async def main(): assert len(seed_phrase) > 0 + await proc.wait() + # Check files validator_keys_folder_path = os.path.join(my_folder_path, DEFAULT_VALIDATOR_KEYS_FOLDER_NAME) _, _, key_files = next(os.walk(validator_keys_folder_path)) diff --git a/tests/test_cli/test_existing_mnemonic.py b/tests/test_cli/test_existing_mnemonic.py index 5b253c8f..64977635 100644 --- a/tests/test_cli/test_existing_mnemonic.py +++ b/tests/test_cli/test_existing_mnemonic.py @@ -281,6 +281,7 @@ async def test_script() -> None: ' '.join(cmd_args), ) await proc.wait() + # Check files validator_keys_folder_path = os.path.join(my_folder_path, DEFAULT_VALIDATOR_KEYS_FOLDER_NAME) _, _, key_files = next(os.walk(validator_keys_folder_path)) @@ -329,6 +330,7 @@ async def test_script_abbreviated_mnemonic() -> None: ' '.join(cmd_args), ) await proc.wait() + # Check files validator_keys_folder_path = os.path.join(my_folder_path, DEFAULT_VALIDATOR_KEYS_FOLDER_NAME) _, _, key_files = next(os.walk(validator_keys_folder_path)) diff --git a/tests/test_cli/test_new_mnemonic.py b/tests/test_cli/test_new_mnemonic.py index cdbb65fa..8a955ff0 100644 --- a/tests/test_cli/test_new_mnemonic.py +++ b/tests/test_cli/test_new_mnemonic.py @@ -409,6 +409,8 @@ async def test_script_bls_withdrawal() -> None: assert len(seed_phrase) > 0 + await proc.wait() + # Check files validator_keys_folder_path = os.path.join(my_folder_path, DEFAULT_VALIDATOR_KEYS_FOLDER_NAME) _, _, key_files = next(os.walk(validator_keys_folder_path)) @@ -495,6 +497,8 @@ async def test_script_abbreviated_mnemonic() -> None: assert len(seed_phrase) > 0 + await proc.wait() + # Check files validator_keys_folder_path = os.path.join(my_folder_path, DEFAULT_VALIDATOR_KEYS_FOLDER_NAME) _, _, key_files = next(os.walk(validator_keys_folder_path))