Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests): remove redundant epoch interval wait #2742

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions cardano_node_tests/tests/test_node_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,6 @@ def _check_models(cost_models: dict):
continue
assert len(cost_models_in[m]) == len(cost_models[m]), f"Unexpected length for {m}"

# Make sure we have enough time to submit the proposal and vote in one epoch
clusterlib_utils.wait_for_epoch_interval(
cluster_obj=cluster, start=1, stop=common.EPOCH_STOP_SEC_BUFFER
)
init_epoch = cluster.g_query.get_epoch()

# Propose the action
prop_rec = _propose_pparams_update(name_template=temp_template, proposals=proposals)
_check_models(prop_rec.future_pparams["costModels"])
Expand All @@ -192,13 +186,10 @@ def _check_models(cost_models: dict):
action_ix=prop_rec.action_ix,
approve_cc=True,
)

assert (
cluster.g_query.get_epoch() == init_epoch
), "Epoch changed and it would affect other checks"
vote_epoch = cluster.g_query.get_epoch()

# Check ratification
rat_epoch = cluster.wait_for_epoch(epoch_no=init_epoch + 1, padding_seconds=5)
rat_epoch = cluster.wait_for_epoch(epoch_no=vote_epoch + 1, padding_seconds=5)
rat_gov_state = cluster.g_conway_governance.query.gov_state()
conway_common.save_gov_state(
gov_state=rat_gov_state, name_template=f"{temp_template}_rat_{rat_epoch}"
Expand All @@ -215,7 +206,7 @@ def _check_models(cost_models: dict):

# Check enactment
enact_epoch = cluster.wait_for_epoch(
epoch_no=init_epoch + 2, padding_seconds=5, future_is_ok=False
epoch_no=vote_epoch + 2, padding_seconds=5, future_is_ok=False
)
enact_gov_state = cluster.g_conway_governance.query.gov_state()
conway_common.save_gov_state(
Expand Down
Loading