From 254c463383421bc81538032c3e2f0670fbb7b454 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Fri, 26 Apr 2024 15:49:04 -0500 Subject: [PATCH 1/3] GH-69 increase allowed unlinkable blocks from 15 to 250 --- tests/nodeos_startup_catchup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/nodeos_startup_catchup.py b/tests/nodeos_startup_catchup.py index 1ae2142f6d..032f2e637e 100755 --- a/tests/nodeos_startup_catchup.py +++ b/tests/nodeos_startup_catchup.py @@ -198,7 +198,10 @@ def waitForNodeStarted(node): logFile = Utils.getNodeDataDir(catchupNodeNum) + "/stderr.txt" f = open(logFile) contents = f.read() - if contents.count("3030001 unlinkable_block_exception: Unlinkable block") > 15: # a few are fine + # See https://github.com/AntelopeIO/spring/issues/81 for fix to reduce the number of expected unlinkable blocks + # Test verifies LIB is advancing, check to see that not too many unlinkable block exceptions are generated + # while syncing up to head. + if contents.count("3030001 unlinkable_block_exception: Unlinkable block") > 250: errorExit(f"Node{catchupNodeNum} has unlinkable blocks: {logFile}.") testSuccessful=True From b2f33e582c3702d445f782635fd3b747d612a27d Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Fri, 26 Apr 2024 16:43:42 -0500 Subject: [PATCH 2/3] GH-69 Test failure was 219, use 500 instead of 250 to give more of a buffer. --- tests/nodeos_startup_catchup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/nodeos_startup_catchup.py b/tests/nodeos_startup_catchup.py index 032f2e637e..9df284fe50 100755 --- a/tests/nodeos_startup_catchup.py +++ b/tests/nodeos_startup_catchup.py @@ -201,7 +201,7 @@ def waitForNodeStarted(node): # See https://github.com/AntelopeIO/spring/issues/81 for fix to reduce the number of expected unlinkable blocks # Test verifies LIB is advancing, check to see that not too many unlinkable block exceptions are generated # while syncing up to head. - if contents.count("3030001 unlinkable_block_exception: Unlinkable block") > 250: + if contents.count("3030001 unlinkable_block_exception: Unlinkable block") > 500: errorExit(f"Node{catchupNodeNum} has unlinkable blocks: {logFile}.") testSuccessful=True From ce9ebb826dc73e8703607dcbfeff82dbc3235269 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Sat, 27 Apr 2024 07:47:13 -0500 Subject: [PATCH 3/3] GH-69 Print the number of unlinkable blocks found in each logfile --- tests/nodeos_startup_catchup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/nodeos_startup_catchup.py b/tests/nodeos_startup_catchup.py index 9df284fe50..b36b829401 100755 --- a/tests/nodeos_startup_catchup.py +++ b/tests/nodeos_startup_catchup.py @@ -201,8 +201,12 @@ def waitForNodeStarted(node): # See https://github.com/AntelopeIO/spring/issues/81 for fix to reduce the number of expected unlinkable blocks # Test verifies LIB is advancing, check to see that not too many unlinkable block exceptions are generated # while syncing up to head. - if contents.count("3030001 unlinkable_block_exception: Unlinkable block") > 500: - errorExit(f"Node{catchupNodeNum} has unlinkable blocks: {logFile}.") + numUnlinkable = contents.count("3030001 unlinkable_block_exception: Unlinkable block") + numUnlinkableAllowed = 500 + Print(f"Node{catchupNodeNum} has {numUnlinkable} unlinkable_block_exception in {logFile}") + if numUnlinkable > numUnlinkableAllowed: + errorExit(f"Node{catchupNodeNum} has {numUnlinkable} which is more than the configured " + f"allowed {numUnlinkableAllowed} unlinkable blocks: {logFile}.") testSuccessful=True