Skip to content

Commit

Permalink
needs_restart_after_failure -> restart_on_failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoura committed Oct 20, 2020
1 parent 6d53575 commit c4bdba0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cardano_node_tests/tests/test_staking.py
Expand Up @@ -796,7 +796,7 @@ def test_no_reward_unmet_pledge1(

cluster.wait_for_new_epoch(3)

with cluster_manager.needs_restart_after_failure():
with cluster_manager.restart_on_failure():
# check that NO new rewards were received by those delegating to the pool
assert (
orig_user_reward
Expand Down Expand Up @@ -920,7 +920,7 @@ def test_no_reward_unmet_pledge2(

cluster.wait_for_new_epoch(3)

with cluster_manager.needs_restart_after_failure():
with cluster_manager.restart_on_failure():
# check that NO new rewards were received by those delegating to the pool
assert (
orig_user_reward
Expand Down Expand Up @@ -1033,7 +1033,7 @@ def test_no_reward_deregistered_stake_addr(
)
cluster.wait_for_new_block(new_blocks=2)

with cluster_manager.needs_restart_after_failure():
with cluster_manager.restart_on_failure():
# check that the key deposit was returned
assert (
cluster.get_address_balance(pool_owner.payment.address)
Expand Down Expand Up @@ -1186,7 +1186,7 @@ def test_no_reward_deregistered_reward_addr(
)
cluster.wait_for_new_block(new_blocks=2)

with cluster_manager.needs_restart_after_failure():
with cluster_manager.restart_on_failure():
# check that the key deposit was returned
assert (
cluster.get_address_balance(pool_reward.payment.address)
Expand Down
2 changes: 1 addition & 1 deletion cardano_node_tests/utils/parallel_run.py
Expand Up @@ -161,7 +161,7 @@ def set_needs_restart(self) -> None:
open(self.lock_dir / f"{RESTART_NEEDED_GLOB}_{self.worker_id}", "a").close()

@contextlib.contextmanager
def needs_restart_after_failure(self) -> Generator:
def restart_on_failure(self) -> Generator:
"""Indicate that the cluster needs restart if command failed - context manager."""
try:
yield
Expand Down

0 comments on commit c4bdba0

Please sign in to comment.