Skip to content

Commit 22000e2

Browse files
authored
Merge pull request #82 from AntelopeIO/GH-69-test-fix
IF: Test: Increase allowed unlinkable block exceptions during syncing
2 parents 8993cbd + ce9ebb8 commit 22000e2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/nodeos_startup_catchup.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,15 @@ def waitForNodeStarted(node):
198198
logFile = Utils.getNodeDataDir(catchupNodeNum) + "/stderr.txt"
199199
f = open(logFile)
200200
contents = f.read()
201-
if contents.count("3030001 unlinkable_block_exception: Unlinkable block") > 15: # a few are fine
202-
errorExit(f"Node{catchupNodeNum} has unlinkable blocks: {logFile}.")
201+
# See https://github.com/AntelopeIO/spring/issues/81 for fix to reduce the number of expected unlinkable blocks
202+
# Test verifies LIB is advancing, check to see that not too many unlinkable block exceptions are generated
203+
# while syncing up to head.
204+
numUnlinkable = contents.count("3030001 unlinkable_block_exception: Unlinkable block")
205+
numUnlinkableAllowed = 500
206+
Print(f"Node{catchupNodeNum} has {numUnlinkable} unlinkable_block_exception in {logFile}")
207+
if numUnlinkable > numUnlinkableAllowed:
208+
errorExit(f"Node{catchupNodeNum} has {numUnlinkable} which is more than the configured "
209+
f"allowed {numUnlinkableAllowed} unlinkable blocks: {logFile}.")
203210

204211
testSuccessful=True
205212

0 commit comments

Comments
 (0)