Skip to content
2 changes: 2 additions & 0 deletions tests/FunctionalTests/comrpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,5 @@ target_link_libraries(ComRpcFunctionalTests
)

add_test(NAME ComRpcFunctionalTests COMMAND ComRpcFunctionalTests)

set_tests_properties(ComRpcFunctionalTests PROPERTIES TIMEOUT 3600)
11 changes: 11 additions & 0 deletions tests/FunctionalTests/comrpc/TestHarness.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,24 @@

#include "Module.h"
#include <gtest/gtest.h>
#include <thread>
#include <chrono>

namespace Thunder {
namespace Testing {

template <typename INTERFACE>
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<RPC::InvokeServerType<4, 0, 1, 1, 1>>::Create();
Expand Down
2 changes: 2 additions & 0 deletions tests/FunctionalTests/jsonrpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,5 @@ target_link_libraries(JsonRpcFunctionalTests
)

add_test(NAME JsonRpcFunctionalTests COMMAND JsonRpcFunctionalTests)

set_tests_properties(JsonRpcFunctionalTests PROPERTIES TIMEOUT 3600)
Loading