From d5d9e2009f7d786bdfa5e4a6fb34677daef4ea2f Mon Sep 17 00:00:00 2001 From: allenhan2 Date: Tue, 16 Jun 2020 17:13:29 -0500 Subject: [PATCH 1/2] GH-427 Merge pull request #9194 from EOSIO/trace_plugin_test Add trace plugin API test --- tests/CMakeLists.txt | 5 +++++ tests/trace_plugin_test.py | 0 2 files changed, 5 insertions(+) mode change 100644 => 100755 tests/trace_plugin_test.py diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 91a456a14d..0e4aa70af7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -64,6 +64,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/trx_finality_status_forked_test.py ${ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/plugin_http_api_test.py ${CMAKE_CURRENT_BINARY_DIR}/plugin_http_api_test.py COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nodeos_contrl_c_test.py ${CMAKE_CURRENT_BINARY_DIR}/nodeos_contrl_c_test.py COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resource_monitor_plugin_test.py ${CMAKE_CURRENT_BINARY_DIR}/resource_monitor_plugin_test.py COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/trace_plugin_test.py ${CMAKE_CURRENT_BINARY_DIR}/trace_plugin_test.py COPYONLY) #To run plugin_test with all log from blockchain displayed, put --verbose after --, i.e. plugin_test -- --verbose add_test(NAME plugin_test COMMAND plugin_test --report_level=detailed --color_output) @@ -220,6 +221,10 @@ add_test(NAME plugin_http_api_test COMMAND tests/plugin_http_api_test.py WORKING set_tests_properties(plugin_http_api_test PROPERTIES TIMEOUT 40) set_property(TEST plugin_http_api_test PROPERTY LABELS nonparallelizable_tests) +add_test(NAME trace_plugin_test COMMAND tests/trace_plugin_test.py WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +set_tests_properties(trace_plugin_test PROPERTIES TIMEOUT 100) +set_property(TEST trace_plugin_test PROPERTY LABELS nonparallelizable_tests) + add_test(NAME resource_monitor_plugin_test COMMAND tests/resource_monitor_plugin_test.py WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST resource_monitor_plugin_test PROPERTY LABELS long_running_tests) diff --git a/tests/trace_plugin_test.py b/tests/trace_plugin_test.py old mode 100644 new mode 100755 From 770a70025751dc0dac3607860553bb6fd1b503c0 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Thu, 30 Jun 2022 18:00:05 -0500 Subject: [PATCH 2/2] GH-427 Fix issue in getTransBlockNum where if except was None it would fail with no_block instead of returning the block number. --- tests/Node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Node.py b/tests/Node.py index 06d2afa939..a2b95f4acc 100644 --- a/tests/Node.py +++ b/tests/Node.py @@ -154,7 +154,7 @@ def getTransBlockNum(trans): cntxt.add("processed") cntxt.add("action_traces") cntxt.index(0) - if cntxt.hasKey("except"): + if not cntxt.isSectionNull("except"): return "no_block" return cntxt.add("block_num")