Skip to content

Commit

Permalink
fix: Removing flakiness from block_production.py
Browse files Browse the repository at this point in the history
The test relies on being able to query all the nodes between every two blocks produced.
Before 7028068 it was likely but flaky, after it the test fails consistently.
It is due to the fact that store validity checks take ~0.35 seconds per `get_status`.
Disabling the validity checks for this test. It is generally OK, because practically
every other test (e.g. transactions.py) is a superset of this test in terms of coverage,
and would catch any storage inconsistency that this test would now miss.

Fixes #3143

Test plan:
---------
http://nayduck.eastus.cloudapp.azure.com:3000/#/run/97
  • Loading branch information
SkidanovAlex committed Aug 14, 2020
1 parent 7028068 commit 6eec2ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pytest/tests/sanity/block_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ def heights_report():
while max_height < BLOCKS:
assert time.time() - started < TIMEOUT
for i, node in enumerate(nodes):
# the test relies on us being able to query heights faster
# than the blocks are produced. Validating store takes up
# to 350ms on slower hardware for this test, multiplied
# by four nodes querying heights every 1 second becomes
# unfeasible
node.stop_checking_store()
status = node.get_status()
height = status['sync_info']['latest_block_height']
hash_ = status['sync_info']['latest_block_hash']
Expand Down

0 comments on commit 6eec2ce

Please sign in to comment.