diff options
author | Jürgen Gehring <Juergen.Gehring@bmw.de> | 2016-12-12 02:29:48 -0800 |
---|---|---|
committer | Jürgen Gehring <Juergen.Gehring@bmw.de> | 2016-12-12 02:29:48 -0800 |
commit | 53ded2eabd7477e8ff2c2286784b2ba9cad2f802 (patch) | |
tree | 91404a94ba7c150d4688c8ec78227940510882dc | |
parent | 01c9c4b3d8627a8eab95e3dcdb5f0f4f1331b004 (diff) | |
download | genivi-common-api-dbus-runtime-53ded2eabd7477e8ff2c2286784b2ba9cad2f802.tar.gz |
CommonAPI-D-Bus 3.1.10.33.1.10.3
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | src/CommonAPI/DBus/DBusFactory.cpp | 4 | ||||
-rw-r--r-- | src/test/DBusConnectionTest.cpp | 6 |
3 files changed, 10 insertions, 3 deletions
@@ -1,6 +1,9 @@ Changes ======= +v3.1.10.3 +- Fixed crash on dlclose() + v3.1.10.2 - Fix of calling unregisterStub() sometimes freezes - Fix deadlock by changing 'std::mutex connectionGuard_' to 'std::recursive_mutex' in D-Bus connection diff --git a/src/CommonAPI/DBus/DBusFactory.cpp b/src/CommonAPI/DBus/DBusFactory.cpp index cde564e..64c39d4 100644 --- a/src/CommonAPI/DBus/DBusFactory.cpp +++ b/src/CommonAPI/DBus/DBusFactory.cpp @@ -21,6 +21,10 @@ INITIALIZER(FactoryInit) { Runtime::get()->registerFactory("dbus", Factory::get()); } +DEINITIALIZER(FactoryDeinit) { + Runtime::get()->unregisterFactory("dbus"); +} + std::shared_ptr<CommonAPI::DBus::Factory> Factory::get() { static std::shared_ptr<Factory> theFactory = std::make_shared<Factory>(); diff --git a/src/test/DBusConnectionTest.cpp b/src/test/DBusConnectionTest.cpp index 8882532..1e999f3 100644 --- a/src/test/DBusConnectionTest.cpp +++ b/src/test/DBusConnectionTest.cpp @@ -70,13 +70,13 @@ TEST_F(DBusConnectionTest, ConnectionStatusEventWorks) { while (expectedEventCount < 10) { ASSERT_TRUE(dbusConnection_->connect()); ASSERT_TRUE(dbusConnection_->isConnected()); - std::this_thread::sleep_for(std::chrono::microseconds(20000)); + std::this_thread::sleep_for(std::chrono::microseconds(40000)); ASSERT_EQ(connectionStatusEventCount, ++expectedEventCount); ASSERT_EQ(connectionStatus, CommonAPI::AvailabilityStatus::AVAILABLE); dbusConnection_->disconnect(); ASSERT_FALSE(dbusConnection_->isConnected()); - std::this_thread::sleep_for(std::chrono::microseconds(20000)); + std::this_thread::sleep_for(std::chrono::microseconds(40000)); ASSERT_EQ(connectionStatusEventCount, ++expectedEventCount); ASSERT_EQ(connectionStatus, CommonAPI::AvailabilityStatus::NOT_AVAILABLE); } @@ -142,7 +142,7 @@ TEST_F(DBusConnectionTest, SendingAsyncDBusMessagesWorks) { &CommonAPI::DBus::defaultCallInfo); for (int i = 0; i < 100; i++) { - std::this_thread::sleep_for(std::chrono::microseconds(10)); + std::this_thread::sleep_for(std::chrono::microseconds(1000)); } ASSERT_EQ(serviceHandlerDBusMessageCount, expectedDBusMessageCount); |