Skip to content

Commit

Permalink
fix(test): state_sync3 (#3171)
Browse files Browse the repository at this point in the history
`state_sync3.py` failed because the head was not far enough behind to trigger state sync in the beginning and caused the test to timeout. Fixes #3165 

Test plan
---------
Run `state_sync3.py` 30 times and observe no failure.
  • Loading branch information
bowenwang1996 committed Aug 14, 2020
1 parent cb0d533 commit e0ff5c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nightly/tests_for_nayduck.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pytest sanity/state_sync.py onetx 30
pytest --timeout=600 sanity/state_sync.py onetx 265
pytest --timeout=240 sanity/state_sync1.py
pytest --timeout=900 sanity/state_sync2.py
pytest --timeout=900 sanity/state_sync3.py
pytest --timeout=1200 sanity/state_sync3.py
pytest --timeout=240 sanity/state_sync4.py
pytest --timeout=600 sanity/state_sync_routed.py manytx 115
pytest --timeout=300 sanity/state_sync_late.py notx
Expand Down
3 changes: 1 addition & 2 deletions pytest/tests/sanity/state_sync3.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
sys.path.append('lib')

from cluster import start_cluster
from transaction import sign_payment_tx

EPOCH_LENGTH = 1000
MAX_SYNC_WAIT = 120
Expand Down Expand Up @@ -41,7 +40,7 @@
print("step 1")

node0_height = 0
while node0_height <= EPOCH_LENGTH + 600:
while node0_height <= EPOCH_LENGTH * 2 + 1:
status = nodes[0].get_status()
node0_height = status['sync_info']['latest_block_height']
time.sleep(5)
Expand Down

0 comments on commit e0ff5c6

Please sign in to comment.