From 29997b0612158e6770917596120d1a3280496c12 Mon Sep 17 00:00:00 2001 From: Brian Johnson Date: Fri, 4 Dec 2020 22:29:30 +0000 Subject: [PATCH 1/2] Addding logging to better identify what is happening --- tests/eosio_blocklog_prune_test.py | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/tests/eosio_blocklog_prune_test.py b/tests/eosio_blocklog_prune_test.py index 260d1efc496..eecc40c1e6f 100755 --- a/tests/eosio_blocklog_prune_test.py +++ b/tests/eosio_blocklog_prune_test.py @@ -158,10 +158,34 @@ # timeForNodesToWorkOutReconnect=30 + 10 # 30 is reconnect cycle since all nodes are restarting and giving time for a little churn lightValidationNode.waitForBlock(cfTrxBlockNum, blockType=BlockType.lib, timeout=WaitSpec.calculate(leeway=timeForNodesToWorkOutReconnect), errorContext="lightValidationNode did not advance") - assert lightValidationNode.waitForHeadToAdvance(), "the light validation node stops syncing" + + pvnPreInfo = producerNode.getInfo(exitOnError=True) + fvnPreInfo = fullValidationNode.getInfo(exitOnError=True) + lvnPreInfo = lightValidationNode.getInfo(exitOnError=True) + + Utils.Print("Ensure light validation node continues to sync") + headAdvanced = lightValidationNode.waitForHeadToAdvance() + pvnPostInfo = producerNode.getInfo(exitOnError=True) + fvnPostInfo = fullValidationNode.getInfo(exitOnError=True) + lvnPostInfo = lightValidationNode.getInfo(exitOnError=True) + if not headAdvanced: + Utils.Print(f"Pre waiting info for each node:\nproducer: {pvnPreInfo}\nfull: {fvnPreInfo},\nlight: {lvnPreInfo}") + Utils.Print(f"Post waiting info for each node:\nproducer: {pvnPreInfo}\nfull: {fvnPreInfo},\nlight: {lvnPreInfo}") + + assert headAdvanced, "the light validation node stops syncing" fullValidationNode.waitForBlock(cfTrxBlockNum-1, blockType=BlockType.lib, timeout=WaitSpec.calculate(), errorContext="fullValidationNode LIB did not advance") - assert not fullValidationNode.waitForHeadToAdvance(), "the full validation node is still syncing" + Utils.Print("Ensure full validation node stops syncing") + headAdvanced = fullValidationNode.waitForHeadToAdvance() + if headAdvanced: + pvnPost2Info = producerNode.getInfo(exitOnError=True) + fvnPost2Info = fullValidationNode.getInfo(exitOnError=True) + lvnPost2Info = lightValidationNode.getInfo(exitOnError=True) + Utils.Print(f"Pre waiting info for each node:\nproducer: {pvnPreInfo}\nfull: {fvnPreInfo},\nlight: {lvnPreInfo}") + Utils.Print(f"Post light validation waiting info for each node:\nproducer: {pvnPostInfo}\nfull: {fvnPostInfo},\nlight: {lvnPostInfo}") + Utils.Print(f"Post full validation waiting info for each node:\nproducer: {pvnPost2Info}\nfull: {fvnPost2Info},\nlight: {lvnPost2Info}") + + assert not headAdvanced, "the full validation node is still syncing" testSuccessful = True finally: From 56bc4b2b37e32ac3a39dcae0c783868d66d049fd Mon Sep 17 00:00:00 2001 From: Brian Johnson Date: Sat, 5 Dec 2020 00:44:54 +0000 Subject: [PATCH 2/2] More logging. --- tests/eosio_blocklog_prune_test.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/eosio_blocklog_prune_test.py b/tests/eosio_blocklog_prune_test.py index eecc40c1e6f..15d832def80 100755 --- a/tests/eosio_blocklog_prune_test.py +++ b/tests/eosio_blocklog_prune_test.py @@ -164,13 +164,14 @@ lvnPreInfo = lightValidationNode.getInfo(exitOnError=True) Utils.Print("Ensure light validation node continues to sync") + headAdvanced = lightValidationNode.waitForHeadToAdvance() pvnPostInfo = producerNode.getInfo(exitOnError=True) fvnPostInfo = fullValidationNode.getInfo(exitOnError=True) lvnPostInfo = lightValidationNode.getInfo(exitOnError=True) if not headAdvanced: - Utils.Print(f"Pre waiting info for each node:\nproducer: {pvnPreInfo}\nfull: {fvnPreInfo},\nlight: {lvnPreInfo}") - Utils.Print(f"Post waiting info for each node:\nproducer: {pvnPreInfo}\nfull: {fvnPreInfo},\nlight: {lvnPreInfo}") + Utils.Print("Pre waiting info for each node:\nproducer: {}\nfull: {},\nlight: {}".format(json.dumps(pvnPreInfo, indent=1), json.dumps(fvnPreInfo, indent=1), json.dumps(lvnPreInfo, indent=1))) + Utils.Print("Post light validation waiting info for each node:\nproducer: {}\nfull: {},\nlight: {}".format(json.dumps(pvnPostInfo, indent=1), json.dumps(fvnPostInfo, indent=1), json.dumps(lvnPostInfo, indent=1))) assert headAdvanced, "the light validation node stops syncing" @@ -181,9 +182,9 @@ pvnPost2Info = producerNode.getInfo(exitOnError=True) fvnPost2Info = fullValidationNode.getInfo(exitOnError=True) lvnPost2Info = lightValidationNode.getInfo(exitOnError=True) - Utils.Print(f"Pre waiting info for each node:\nproducer: {pvnPreInfo}\nfull: {fvnPreInfo},\nlight: {lvnPreInfo}") - Utils.Print(f"Post light validation waiting info for each node:\nproducer: {pvnPostInfo}\nfull: {fvnPostInfo},\nlight: {lvnPostInfo}") - Utils.Print(f"Post full validation waiting info for each node:\nproducer: {pvnPost2Info}\nfull: {fvnPost2Info},\nlight: {lvnPost2Info}") + Utils.Print("Pre waiting info for each node:\nproducer: {}\nfull: {},\nlight: {}".format(json.dumps(pvnPreInfo, indent=1), json.dumps(fvnPreInfo, indent=1), json.dumps(lvnPreInfo, indent=1))) + Utils.Print("Post light validation waiting info for each node:\nproducer: {}\nfull: {},\nlight: {}".format(json.dumps(pvnPostInfo, indent=1), json.dumps(fvnPostInfo, indent=1), json.dumps(lvnPostInfo, indent=1))) + Utils.Print("Post full validation waiting info for each node:\nproducer: {}\nfull: {},\nlight: {}".format(json.dumps(pvnPost2Info, indent=1), json.dumps(fvnPost2Info, indent=1), json.dumps(lvnPost2Info, indent=1))) assert not headAdvanced, "the full validation node is still syncing"