Skip to content

Commit

Permalink
GH-1510 Add ship_if_test
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Jan 31, 2024
1 parent d980a43 commit 6ebb398
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ add_test(NAME ship_test COMMAND tests/ship_test.py -v --num-clients 10 --num-req
set_property(TEST ship_test PROPERTY LABELS nonparallelizable_tests)
add_test(NAME ship_test_unix COMMAND tests/ship_test.py -v --num-clients 10 --num-requests 5000 ${UNSHARE} --unix-socket WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST ship_test_unix PROPERTY LABELS nonparallelizable_tests)
add_test(NAME ship_if_test COMMAND tests/ship_test.py -v --activate-if --num-clients 10 --num-requests 5000 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST ship_if_test PROPERTY LABELS nonparallelizable_tests)

add_test(NAME ship_streamer_test COMMAND tests/ship_streamer_test.py -v --num-clients 10 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST ship_streamer_test PROPERTY LABELS long_running_tests)
Expand Down
5 changes: 3 additions & 2 deletions tests/ship_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
extraArgs = appArgs.add(flag="--num-requests", type=int, help="How many requests that each ship_client requests", default=1)
extraArgs = appArgs.add(flag="--num-clients", type=int, help="How many ship_clients should be started", default=1)
extraArgs = appArgs.add_bool(flag="--unix-socket", help="Run ship over unix socket")
args = TestHelper.parse_args({"-p", "-n","--dump-error-details","--keep-logs","-v","--leave-running","--unshared"}, applicationSpecificArgs=appArgs)
args = TestHelper.parse_args({"-p", "-n","--activate-if","--dump-error-details","--keep-logs","-v","--leave-running","--unshared"}, applicationSpecificArgs=appArgs)

Utils.Debug=args.v
totalProducerNodes=args.p
Expand All @@ -40,6 +40,7 @@
totalNonProducerNodes=totalNodes-totalProducerNodes
totalProducers=totalProducerNodes
cluster=Cluster(unshared=args.unshared, keepRunning=args.leave_running, keepLogs=args.keep_logs)
activateIF=args.activate_if
dumpErrorDetails=args.dump_error_details
walletPort=TestHelper.DEFAULT_WALLET_PORT

Expand All @@ -63,7 +64,7 @@
specificExtraNodeosArgs[shipNodeNum] += "--state-history-unix-socket-path ship.sock"

if cluster.launch(pnodes=totalProducerNodes,
totalNodes=totalNodes, totalProducers=totalProducers,
totalNodes=totalNodes, totalProducers=totalProducers, activateIF=activateIF,
specificExtraNodeosArgs=specificExtraNodeosArgs) is False:
Utils.cmdError("launcher")
Utils.errorExit("Failed to stand up eos cluster.")
Expand Down

0 comments on commit 6ebb398

Please sign in to comment.