diff options
author | Stefan Laner <laner@itestra.de> | 2014-04-09 15:53:09 +0200 |
---|---|---|
committer | Stefan Laner <laner@itestra.de> | 2014-04-09 15:57:04 +0200 |
commit | cfa691dead04acffe08155733689f1932054f425 (patch) | |
tree | 7d237f3b9ed72b8ef6c5701669dea05e5099b4f7 /src/test/DBusLoadTest.cpp | |
parent | c65f551cd7ed799d0aafd5de8584c98236f65de6 (diff) | |
download | genivi-common-api-dbus-runtime-cfa691dead04acffe08155733689f1932054f425.tar.gz |
improved DBusBroadcastTest and DBusLoadTest
Change-Id: I413fd262a1c965f8c915180d092408f56f57356e
Diffstat (limited to 'src/test/DBusLoadTest.cpp')
-rw-r--r-- | src/test/DBusLoadTest.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
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<CommonAPI::Runtime> runtime_; @@ -93,6 +94,7 @@ public: std::shared_ptr<CommonAPI::Factory> stubFactory_; std::shared_ptr<CommonAPI::ServicePublisher> servicePublisher_; std::vector<bool> callSucceeded_; + std::mutex mutexCallSucceeded_; static const std::string serviceAddress_; static const uint32_t numCallsPerProxy_; |