Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IF: Test: Add transition test with 21 nodes #2363

Merged
merged 4 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be long_running_tests while transition_to_if is nonparallelizable_tests?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 21 producers means it takes longer to transition; figured the run time now is enough to be a 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)
Expand Down
9 changes: 5 additions & 4 deletions tests/transition_to_if.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.")
Expand All @@ -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"
Expand Down
Loading