diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e9d1f759d5..993af3eff6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -140,6 +140,8 @@ set_property(TEST cluster_launcher_if PROPERTY LABELS nonparallelizable_tests) add_test(NAME transition_to_if COMMAND tests/transition_to_if.py -v ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST transition_to_if PROPERTY LABELS nonparallelizable_tests) +add_test(NAME transition_to_if_lr COMMAND tests/transition_to_if.py -v -p 20 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +set_property(TEST transition_to_if_lr PROPERTY LABELS long_running_tests) add_test(NAME ship_test COMMAND tests/ship_test.py -v --num-clients 10 --num-requests 5000 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST ship_test PROPERTY LABELS nonparallelizable_tests) diff --git a/tests/transition_to_if.py b/tests/transition_to_if.py index 3df75ac27a..249248d3c7 100755 --- a/tests/transition_to_if.py +++ b/tests/transition_to_if.py @@ -15,14 +15,15 @@ errorExit=Utils.errorExit appArgs = AppArgs() -args=TestHelper.parse_args({"-d","-s","--keep-logs","--dump-error-details","-v","--leave-running","--unshared"}, +args=TestHelper.parse_args({"-p","-d","-s","--keep-logs","--dump-error-details","-v","--leave-running","--unshared"}, applicationSpecificArgs=appArgs) -pnodes=4 +pnodes=args.p if args.p > 4 else 4 delay=args.d topo=args.s debug=args.v prod_count = 1 # per node prod count total_nodes=pnodes+1 +irreversibleNodeId=pnodes dumpErrorDetails=args.dump_error_details Utils.Debug=debug @@ -41,7 +42,7 @@ numTrxGenerators=2 Print("Stand up cluster") # For now do not load system contract as it does not support setfinalizer - specificExtraNodeosArgs = { 4: "--read-mode irreversible"} + specificExtraNodeosArgs = { irreversibleNodeId: "--read-mode irreversible"} if cluster.launch(pnodes=pnodes, totalNodes=total_nodes, prodCount=prod_count, maximumP2pPerHost=total_nodes+numTrxGenerators, topo=topo, delay=delay, loadSystemContract=False, activateIF=False, specificExtraNodeosArgs=specificExtraNodeosArgs) is False: errorExit("Failed to stand up eos cluster.") @@ -66,7 +67,7 @@ assert cluster.biosNode.waitForHeadToAdvance(blocksToAdvance=13), "Head did not advance 13 blocks to next producer" assert cluster.biosNode.waitForLibToAdvance(), "Lib stopped advancing on biosNode" assert cluster.getNode(1).waitForLibToAdvance(), "Lib stopped advancing on Node 1" - assert cluster.getNode(4).waitForLibToAdvance(), "Lib stopped advancing on Node 4, irreversible node" + assert cluster.getNode(irreversibleNodeId).waitForLibToAdvance(), f"Lib stopped advancing on Node {irreversibleNodeId}, irreversible node" info = cluster.biosNode.getInfo(exitOnError=True) assert (info["head_block_num"] - info["last_irreversible_block_num"]) < 9, "Instant finality enabled LIB diff should be small"