diff options
Diffstat (limited to 'test/routing_tests/local_routing_test_service.cpp')
-rw-r--r-- | test/routing_tests/local_routing_test_service.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/routing_tests/local_routing_test_service.cpp b/test/routing_tests/local_routing_test_service.cpp index 3a61ddf..137e8ea 100644 --- a/test/routing_tests/local_routing_test_service.cpp +++ b/test/routing_tests/local_routing_test_service.cpp @@ -15,13 +15,13 @@ local_routing_test_service::local_routing_test_service(bool _use_static_routing) { } -void local_routing_test_service::init() +bool local_routing_test_service::init() { std::lock_guard<std::mutex> its_lock(mutex_); if (!app_->init()) { - VSOMEIP_ERROR << "Couldn't initialize application"; - EXPECT_TRUE(false); + ADD_FAILURE() << "Couldn't initialize application"; + return false; } app_->register_message_handler(vsomeip_test::TEST_SERVICE_SERVICE_ID, vsomeip_test::TEST_SERVICE_INSTANCE_ID, vsomeip_test::TEST_SERVICE_METHOD_ID, @@ -33,6 +33,7 @@ void local_routing_test_service::init() std::placeholders::_1)); VSOMEIP_INFO << "Static routing " << (use_static_routing_ ? "ON" : "OFF"); + return true; } void local_routing_test_service::start() @@ -148,9 +149,10 @@ TEST(someip_local_routing_test, receive_ten_messages_over_local_uds_socket) { bool use_static_routing = true; local_routing_test_service test_service(use_static_routing); - test_service.init(); - test_service.start(); - test_service.join_offer_thread(); + if (test_service.init()) { + test_service.start(); + test_service.join_offer_thread(); + } } #ifndef WIN32 |