diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b73809254d..d604011bc6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -131,13 +131,13 @@ add_test(NAME nodeos_protocol_feature_test COMMAND tests/nodeos_protocol_feature set_property(TEST nodeos_protocol_feature_test PROPERTY LABELS nonparallelizable_tests) add_test(NAME compute_transaction_test COMMAND tests/compute_transaction_test.py -v -p 2 -n 3 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST compute_transaction_test PROPERTY LABELS nonparallelizable_tests) -add_test(NAME read-only-trx-basic-test COMMAND tests/read_only_trx_test.py -v -p 2 -n 3 --read-only-threads 1 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +add_test(NAME read-only-trx-basic-test COMMAND tests/read_only_trx_test.py -p 2 -n 3 --read-only-threads 1 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST read-only-trx-basic-test PROPERTY LABELS nonparallelizable_tests) -add_test(NAME read-only-trx-parallel-test COMMAND tests/read_only_trx_test.py -v -p 2 -n 3 --read-only-threads 16 --num-test-runs 3 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +add_test(NAME read-only-trx-parallel-test COMMAND tests/read_only_trx_test.py -p 2 -n 3 --read-only-threads 16 --num-test-runs 3 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST read-only-trx-parallel-test PROPERTY LABELS nonparallelizable_tests) -add_test(NAME read-only-trx-parallel-eos-vm-oc-test COMMAND tests/read_only_trx_test.py -v -p 2 -n 3 --eos-vm-oc-enable all --read-only-threads 16 --num-test-runs 3 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +add_test(NAME read-only-trx-parallel-eos-vm-oc-test COMMAND tests/read_only_trx_test.py -p 2 -n 3 --eos-vm-oc-enable all --read-only-threads 16 --num-test-runs 3 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST read-only-trx-parallel-eos-vm-oc-test PROPERTY LABELS nonparallelizable_tests) -add_test(NAME read-only-trx-parallel-no-oc-test COMMAND tests/read_only_trx_test.py -v -p 2 -n 3 --eos-vm-oc-enable none --read-only-threads 6 --num-test-runs 2 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +add_test(NAME read-only-trx-parallel-no-oc-test COMMAND tests/read_only_trx_test.py -p 2 -n 3 --eos-vm-oc-enable none --read-only-threads 6 --num-test-runs 2 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST read-only-trx-parallel-no-oc-test PROPERTY LABELS nonparallelizable_tests) add_test(NAME subjective_billing_test COMMAND tests/subjective_billing_test.py -v -p 2 -n 4 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST subjective_billing_test PROPERTY LABELS nonparallelizable_tests) diff --git a/tests/read_only_trx_test.py b/tests/read_only_trx_test.py index 7b6a555bc5..6af91c5a83 100755 --- a/tests/read_only_trx_test.py +++ b/tests/read_only_trx_test.py @@ -6,6 +6,7 @@ import threading import os import platform +import traceback from TestHarness import Account, Cluster, ReturnType, TestHelper, Utils, WalletMgr from TestHarness.TestHelper import AppArgs @@ -102,6 +103,7 @@ def startCluster(): specificExtraNodeosArgs={} # producer nodes will be mapped to 0 through pnodes-1, so the number pnodes is the no-producing API node specificExtraNodeosArgs[pnodes]=" --plugin eosio::net_api_plugin" + specificExtraNodeosArgs[pnodes]+=" --contracts-console " specificExtraNodeosArgs[pnodes]+=" --read-only-write-window-time-us " specificExtraNodeosArgs[pnodes]+=" 10000 " specificExtraNodeosArgs[pnodes]+=" --read-only-read-window-time-us " @@ -228,7 +230,8 @@ def sendReadOnlyTrxOnThread(startId, numTrxs): assert(results[1]['processed']['action_traces'][0]['console'] == "Im a payloadless slow action") assert(int(results[1]['processed']['elapsed']) > 100) except Exception as e: - Print("Exception in sendReadOnlyTrxOnThread: ", e) + Print("Exception in sendReadOnlyTrxOnThread: ", repr(e)) + traceback.print_exc() errorInThread = True # Send regular trxs from mutltiple threads to bump load @@ -242,7 +245,8 @@ def sendTrxsOnThread(startId, numTrxs, opts=None): results = sendTransaction(testAccountName, 'age', {"user": userAccountName, "id": startId + i}, auth=[{"actor": userAccountName, "permission":"active"}], opts=opts) assert(results[0]) except Exception as e: - Print("Exception in sendTrxsOnThread: ", e) + Print("Exception in sendTrxsOnThread: ", repr(e)) + traceback.print_exc() errorInThread = True def doRpc(resource, command, numRuns, fieldIn, expectedValue, code, payload={}): @@ -258,7 +262,8 @@ def doRpc(resource, command, numRuns, fieldIn, expectedValue, code, payload={}): else: assert(ret_json["code"] == code) except Exception as e: - Print("Exception in doRpc: ", e) + Print("Exception in doRpc: ", repr(e)) + traceback.print_exc() errorInThread = True def runReadOnlyTrxAndRpcInParallel(resource, command, fieldIn=None, expectedValue=None, code=None, payload={}):