diff --git a/tests/FunctionalTests/comrpc/CMakeLists.txt b/tests/FunctionalTests/comrpc/CMakeLists.txt index fd0051d0..b50e140b 100644 --- a/tests/FunctionalTests/comrpc/CMakeLists.txt +++ b/tests/FunctionalTests/comrpc/CMakeLists.txt @@ -122,3 +122,5 @@ target_link_libraries(ComRpcFunctionalTests ) add_test(NAME ComRpcFunctionalTests COMMAND ComRpcFunctionalTests) + +set_tests_properties(ComRpcFunctionalTests PROPERTIES TIMEOUT 3600) diff --git a/tests/FunctionalTests/comrpc/TestHarness.h b/tests/FunctionalTests/comrpc/TestHarness.h index b07a8f1e..fbf387ec 100644 --- a/tests/FunctionalTests/comrpc/TestHarness.h +++ b/tests/FunctionalTests/comrpc/TestHarness.h @@ -21,6 +21,8 @@ #include "Module.h" #include +#include +#include namespace Thunder { namespace Testing { @@ -28,6 +30,15 @@ namespace Testing { template class TestHarness : public ::testing::Test { protected: + void SetUp() override + { + // Allow time for previous test to complete RPC cleanup and socket draining. + // Tests like TestEvents wait up to 2-3 seconds for notifications and async callbacks. + // Previous test's Unregister() call needs time to drain from the socket. + // Buffer of 500ms ensures socket is ready for next test's RPC operations. + std::this_thread::sleep_for(std::chrono::milliseconds(500)); + } + static void SetUpTestSuite() { _engine = Core::ProxyType>::Create(); diff --git a/tests/FunctionalTests/jsonrpc/CMakeLists.txt b/tests/FunctionalTests/jsonrpc/CMakeLists.txt index ff90eb8e..0fac421d 100644 --- a/tests/FunctionalTests/jsonrpc/CMakeLists.txt +++ b/tests/FunctionalTests/jsonrpc/CMakeLists.txt @@ -107,3 +107,5 @@ target_link_libraries(JsonRpcFunctionalTests ) add_test(NAME JsonRpcFunctionalTests COMMAND JsonRpcFunctionalTests) + +set_tests_properties(JsonRpcFunctionalTests PROPERTIES TIMEOUT 3600)