Skip to content

Commit

Permalink
GH-1510 Add - terminate-scenarios-if-test-resync
Browse files Browse the repository at this point in the history
            - terminate-scenarios-if-test-replay (disabled) requires #2141
            - terminate-scenarios-if-test-hard_replay
  • Loading branch information
heifner committed Jan 31, 2024
1 parent a2ef2e2 commit 76fe85f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ add_test(NAME terminate-scenarios-test-replay COMMAND tests/terminate-scenarios-
set_property(TEST terminate-scenarios-test-replay PROPERTY LABELS nonparallelizable_tests)
add_test(NAME terminate-scenarios-test-hard_replay COMMAND tests/terminate-scenarios-test.py -c hardReplay --terminate-at-block 10 --kill-sig term ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST terminate-scenarios-test-hard_replay PROPERTY LABELS nonparallelizable_tests)
add_test(NAME terminate-scenarios-if-test-resync COMMAND tests/terminate-scenarios-test.py -c resync --terminate-at-block 10 --kill-sig term --activate-if ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST terminate-scenarios-if-test-resync PROPERTY LABELS nonparallelizable_tests)
# requires https://github.com/AntelopeIO/leap/issues/2141
#add_test(NAME terminate-scenarios-if-test-replay COMMAND tests/terminate-scenarios-test.py -c replay --terminate-at-block 10 --kill-sig term --activate-if ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
#set_property(TEST terminate-scenarios-if-test-replay PROPERTY LABELS nonparallelizable_tests)
add_test(NAME terminate-scenarios-if-test-hard_replay COMMAND tests/terminate-scenarios-test.py -c hardReplay --terminate-at-block 10 --kill-sig term --activate-if ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST terminate-scenarios-test-hard_replay PROPERTY LABELS nonparallelizable_tests)
add_test(NAME validate_dirty_db_test COMMAND tests/validate-dirty-db.py -v ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST validate_dirty_db_test PROPERTY LABELS nonparallelizable_tests)
add_test(NAME keosd_auto_launch_test COMMAND tests/keosd_auto_launch_test.py WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
Expand Down
5 changes: 3 additions & 2 deletions tests/terminate-scenarios-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
errorExit=Utils.errorExit

args=TestHelper.parse_args({"-d","-s","-c","--kill-sig","--keep-logs"
,"--dump-error-details","-v","--leave-running"
,"--activate-if","--dump-error-details","-v","--leave-running"
,"--terminate-at-block","--unshared"})
pnodes=1
topo=args.s
Expand All @@ -27,6 +27,7 @@
debug=args.v
total_nodes = pnodes
killSignal=args.kill_sig
activateIF=args.activate_if
dumpErrorDetails=args.dump_error_details
terminate=args.terminate_at_block

Expand All @@ -49,7 +50,7 @@
pnodes, topo, delay, chainSyncStrategyStr))

Print("Stand up cluster")
if cluster.launch(pnodes=pnodes, totalNodes=total_nodes, topo=topo, delay=delay) is False:
if cluster.launch(pnodes=pnodes, totalNodes=total_nodes, topo=topo, delay=delay, activateIF=activateIF) is False:
errorExit("Failed to stand up eos cluster.")

Print ("Wait for Cluster stabilization")
Expand Down

0 comments on commit 76fe85f

Please sign in to comment.