tests: Various timing fixes
authorJohannes Schanda <schanda@itestra.de>
Thu, 28 Feb 2013 09:21:19 +0000 (10:21 +0100)
committerJohannes Schanda <schanda@itestra.de>
Thu, 28 Feb 2013 09:21:19 +0000 (10:21 +0100)
src/test/DBusAddressTranslatorTest.cpp
src/test/DBusProxyTest.cpp
src/test/DBusServiceRegistryTest.cpp

index 6c17e29..c2b5286 100644 (file)
@@ -75,7 +75,8 @@ static const std::string fileString =
 "[local:fake.legacy.service.LegacyInterface:fake.legacy.service]\n"
 "dbus_connection=fake.legacy.service.connection\n"
 "dbus_object=/some/legacy/path/6259504\n"
-"dbus_interface=fake.legacy.service.LegacyInterface\n";
+"dbus_interface=fake.legacy.service.LegacyInterface\n"
+"dbus_predefined=true\n";
 
 typedef std::vector<CommonAPI::DBus::DBusServiceAddress>::value_type vt;
 static const std::vector<CommonAPI::DBus::DBusServiceAddress> dbusAddresses = {
index 25b9a3b..7a5f817 100644 (file)
@@ -185,7 +185,7 @@ TEST_F(ProxyTest, ServiceStatus) {
             break;
         }
     }
-
+    sleep(1);
        auto found = std::find(availableDBusServices.begin(), availableDBusServices.end(), commonApiAddress);
 
        ASSERT_TRUE(availableDBusServices.begin() != availableDBusServices.end());
index 12656e7..dbbd7d7 100644 (file)
@@ -130,6 +130,7 @@ class DBusServiceRegistryTestWithPredefinedRemote: public ::testing::Test {
 
 
 TEST_F(DBusServiceRegistryTestWithPredefinedRemote, RecognizesCommonAPIDBusServiceInstanceAsAlive) {
+    sleep(1);
     ASSERT_TRUE(dbusServiceRegistry_->isServiceInstanceAlive("test.service.name", "test.instance.name", "/test/instance/name"));
 }