Skip to content

Commit

Permalink
Make sure to wait for the process to exit to prevent some races
Browse files Browse the repository at this point in the history
  • Loading branch information
remyroy committed May 28, 2024
1 parent c35380e commit 9704f76
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test_binary_btec_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 2 additions & 0 deletions test_binary_deposit_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 2 additions & 0 deletions test_btec_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 2 additions & 0 deletions test_deposit_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 2 additions & 0 deletions tests/test_cli/test_existing_mnemonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
4 changes: 4 additions & 0 deletions tests/test_cli/test_new_mnemonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 9704f76

Please sign in to comment.