summaryrefslogtreecommitdiff
path: root/test/cpu_load_tests/cpu_load_test_service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpu_load_tests/cpu_load_test_service.cpp')
-rw-r--r--test/cpu_load_tests/cpu_load_test_service.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/cpu_load_tests/cpu_load_test_service.cpp b/test/cpu_load_tests/cpu_load_test_service.cpp
index 67b4ef9..f8fbde3 100644
--- a/test/cpu_load_tests/cpu_load_test_service.cpp
+++ b/test/cpu_load_tests/cpu_load_test_service.cpp
@@ -36,13 +36,13 @@ public:
{
}
- void init()
+ bool 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(cpu_load_test::service_id,
cpu_load_test::instance_id, cpu_load_test::method_id,
@@ -64,6 +64,7 @@ public:
app_->register_state_handler(
std::bind(&cpu_load_test_service::on_state, this,
std::placeholders::_1));
+ return true;
}
void start()
@@ -189,9 +190,10 @@ private:
TEST(someip_payload_test, send_response_for_every_request)
{
cpu_load_test_service test_service;
- 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