summaryrefslogtreecommitdiff
path: root/test/header_factory_tests/header_factory_test_service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/header_factory_tests/header_factory_test_service.cpp')
-rw-r--r--test/header_factory_tests/header_factory_test_service.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/header_factory_tests/header_factory_test_service.cpp b/test/header_factory_tests/header_factory_test_service.cpp
index 0367d40..0ff516f 100644
--- a/test/header_factory_tests/header_factory_test_service.cpp
+++ b/test/header_factory_tests/header_factory_test_service.cpp
@@ -21,7 +21,10 @@ void header_factory_test_service::init()
{
std::lock_guard<std::mutex> its_lock(mutex_);
- app_->init();
+ if (!app_->init()) {
+ VSOMEIP_ERROR << "Couldn't initialize application";
+ EXPECT_TRUE(false);
+ }
app_->register_message_handler(vsomeip_test::TEST_SERVICE_SERVICE_ID,
vsomeip_test::TEST_SERVICE_INSTANCE_ID, vsomeip_test::TEST_SERVICE_METHOD_ID,
std::bind(&header_factory_test_service::on_message, this,
@@ -43,9 +46,7 @@ void header_factory_test_service::start()
void header_factory_test_service::stop()
{
VSOMEIP_INFO << "Stopping...";
- app_->unregister_message_handler(vsomeip_test::TEST_SERVICE_SERVICE_ID,
- vsomeip_test::TEST_SERVICE_INSTANCE_ID, vsomeip_test::TEST_SERVICE_METHOD_ID);
- app_->unregister_state_handler();
+ app_->clear_all_handler();
app_->stop();
std::thread t([](){ std::this_thread::sleep_for(std::chrono::microseconds(1000000 * 5));});
t.join();