From cfa691dead04acffe08155733689f1932054f425 Mon Sep 17 00:00:00 2001 From: Stefan Laner Date: Wed, 9 Apr 2014 15:53:09 +0200 Subject: improved DBusBroadcastTest and DBusLoadTest Change-Id: I413fd262a1c965f8c915180d092408f56f57356e --- src/test/DBusLoadTest.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/test/DBusLoadTest.cpp') diff --git a/src/test/DBusLoadTest.cpp b/src/test/DBusLoadTest.cpp index 94090d3..e5e26bc 100644 --- a/src/test/DBusLoadTest.cpp +++ b/src/test/DBusLoadTest.cpp @@ -42,6 +42,7 @@ public: std::string stringInValue, uint32_t& uint32OutValue, std::string& stringOutValue) { + uint32OutValue = uint32InValue; stringOutValue = stringInValue; } @@ -82,10 +83,10 @@ public: EXPECT_EQ(callStatus, CommonAPI::CallStatus::SUCCESS); EXPECT_EQ(out1, in1); EXPECT_EQ(out2, in2); - if (callStatus == CommonAPI::CallStatus::SUCCESS) { - ASSERT_FALSE(callSucceeded_[callId]); - callSucceeded_[callId] = true; - } + mutexCallSucceeded_.lock(); + ASSERT_FALSE(callSucceeded_[callId]); + callSucceeded_[callId] = true; + mutexCallSucceeded_.unlock(); } std::shared_ptr runtime_; @@ -93,6 +94,7 @@ public: std::shared_ptr stubFactory_; std::shared_ptr servicePublisher_; std::vector callSucceeded_; + std::mutex mutexCallSucceeded_; static const std::string serviceAddress_; static const uint32_t numCallsPerProxy_; -- cgit v1.2.1