Skip to content

Commit a25bb64

Browse files
tests: wait 4 epochs for e2e test_incentive
1 parent 8b60b64 commit a25bb64

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/e2e_tests/test_incentive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ async def test_incentive(local_chain, subtensor, templates, alice_wallet, bob_wa
7373
# wait for the Validator to process and set_weights
7474
await asyncio.sleep(5)
7575

76-
# Wait until next epoch
77-
await wait_epoch(subtensor, netuid)
76+
# Wait few epochs
77+
await wait_epoch(subtensor, netuid, times=4)
7878

7979
# Refresh metagraph
8080
metagraph = subtensor.metagraph(netuid)

tests/e2e_tests/utils/chain_interactions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def sudo_set_hyperparameter_values(
6767
return response.is_success
6868

6969

70-
async def wait_epoch(subtensor: "Subtensor", netuid: int = 1):
70+
async def wait_epoch(subtensor: "Subtensor", netuid: int = 1, times: int = 1):
7171
"""
7272
Waits for the next epoch to start on a specific subnet.
7373
@@ -83,7 +83,7 @@ async def wait_epoch(subtensor: "Subtensor", netuid: int = 1):
8383
raise Exception("could not determine tempo")
8484
tempo = q_tempo[0].value
8585
logging.info(f"tempo = {tempo}")
86-
await wait_interval(tempo, subtensor, netuid)
86+
await wait_interval(tempo * times, subtensor, netuid)
8787

8888

8989
def next_tempo(current_block: int, tempo: int, netuid: int) -> int:

0 commit comments

Comments
 (0)