Skip to content

Commit ce9ebb8

Browse files
committed
GH-69 Print the number of unlinkable blocks found in each logfile
1 parent b2f33e5 commit ce9ebb8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/nodeos_startup_catchup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,12 @@ def waitForNodeStarted(node):
201201
# See https://github.com/AntelopeIO/spring/issues/81 for fix to reduce the number of expected unlinkable blocks
202202
# Test verifies LIB is advancing, check to see that not too many unlinkable block exceptions are generated
203203
# while syncing up to head.
204-
if contents.count("3030001 unlinkable_block_exception: Unlinkable block") > 500:
205-
errorExit(f"Node{catchupNodeNum} has unlinkable blocks: {logFile}.")
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}.")
206210

207211
testSuccessful=True
208212

0 commit comments

Comments
 (0)