Exemplo n.º 1
0
    End2EndSubscriptionTest() :
        runtime1(nullptr),
        runtime2(nullptr),
        settings1("test-resources/SystemIntegrationTest1.settings"),
        settings2("test-resources/SystemIntegrationTest2.settings"),
        messagingSettings1(settings1),
        messagingSettings2(settings2),
        baseUuid(Util::createUuid()),
        uuid( "_" + baseUuid.substr(1, baseUuid.length()-2)),
        domainName("cppEnd2EndSubscriptionTest_Domain" + uuid),
        semaphore(0),
        registerProviderWait(1000),
        subscribeToAttributeWait(2000)

    {
        messagingSettings1.setMessagingPropertiesPersistenceFilename(
                    messagingPropertiesPersistenceFileName1);
        messagingSettings2.setMessagingPropertiesPersistenceFilename(
                    messagingPropertiesPersistenceFileName2);

        Settings* settings_1 = new Settings("test-resources/SystemIntegrationTest1.settings");
        Settings integration1Settings{"test-resources/libjoynrSystemIntegration1.settings"};
        Settings::merge(integration1Settings, *settings_1, false);

        runtime1 = new JoynrClusterControllerRuntime(nullptr, settings_1);

        Settings* settings_2 = new Settings("test-resources/SystemIntegrationTest2.settings");
        Settings integration2Settings{"test-resources/libjoynrSystemIntegration2.settings"};
        Settings::merge(integration2Settings, *settings_2, false);

        runtime2 = new JoynrClusterControllerRuntime(nullptr, settings_2);
    }
Exemplo n.º 2
0
 CapabilitiesClientTest() :
     logger(joynr_logging::Logging::getInstance()->getLogger("TEST", "CapabilitiesClientTest")),
     runtime(NULL),
     settings(settingsFilename, QSettings::IniFormat),
     messagingSettings(settings)
 {
     messagingSettings.setMessagingPropertiesPersistenceFilename(messagingPropertiesPersistenceFileName);
     MessagingPropertiesPersistence storage(messagingSettings.getMessagingPropertiesPersistenceFilename());
     channelId = storage.getChannelId().toStdString();
     QSettings* settings = SettingsMerger::mergeSettings(settingsFilename);
     SettingsMerger::mergeSettings(libJoynrSettingsFilename, settings);
     runtime = new JoynrClusterControllerRuntime(NULL, settings);
 }
Exemplo n.º 3
0
    CapabilitiesClientTest() :
        runtime(nullptr),
        settings(settingsFilename),
        messagingSettings(settings)
    {
        messagingSettings.setMessagingPropertiesPersistenceFilename(messagingPropertiesPersistenceFileName);
        MessagingPropertiesPersistence storage(messagingSettings.getMessagingPropertiesPersistenceFilename());
        channelId = storage.getChannelId();
        Settings* settings = new Settings(settingsFilename);
        Settings libjoynrSettings{libJoynrSettingsFilename};
        Settings::merge(libjoynrSettings, *settings, false);

        runtime = new JoynrClusterControllerRuntime(nullptr, settings);
    }
Exemplo n.º 4
0
    End2EndBroadcastTest() :
        qRegisterMetaTypeQos(),
//        qRegisterMetaTypeCi(),
        runtime1(NULL),
        runtime2(NULL),
        settings1("test-resources/SystemIntegrationTest1.settings", QSettings::IniFormat),
        settings2("test-resources/SystemIntegrationTest2.settings", QSettings::IniFormat),
        messagingSettings1(settings1),
        messagingSettings2(settings2),
        baseUuid(TypeUtil::toStd(QUuid::createUuid().toString())),
        uuid( "_" + baseUuid.substr(1, baseUuid.length()-2)),
        domainName("cppEnd2EndBroadcastTest_Domain" + uuid),
        semaphore(0),
        altSemaphore(0),
        filter(new MockLocationUpdatedSelectiveFilter),
        registerProviderWait(1000),
        subscribeToAttributeWait(2000),
        subscribeToBroadcastWait(2000),
        gpsLocation(types::Localisation::GpsLocation()),
        gpsLocation2(types::Localisation::GpsLocation(
                         9.0,
                         51.0,
                         508.0,
                         types::Localisation::GpsFixEnum::MODE2D,
                         0.0,
                         0.0,
                         0.0,
                         0.0,
                         444,
                         444,
                         2)),
        gpsLocation3(types::Localisation::GpsLocation(
                         9.0,
                         51.0,
                         508.0,
                         types::Localisation::GpsFixEnum::MODE2D,
                         0.0,
                         0.0,
                         0.0,
                         0.0,
                         444,
                         444,
                         3)),
        gpsLocation4(types::Localisation::GpsLocation(
                         9.0,
                         51.0,
                         508.0,
                         types::Localisation::GpsFixEnum::MODE2D,
                         0.0,
                         0.0,
                         0.0,
                         0.0,
                         444,
                         444,
                         4))

    {
        messagingSettings1.setMessagingPropertiesPersistenceFilename(
                    messagingPropertiesPersistenceFileName1);
        messagingSettings2.setMessagingPropertiesPersistenceFilename(
                    messagingPropertiesPersistenceFileName2);

        QSettings* settings_1 = SettingsMerger::mergeSettings(
                    QString("test-resources/SystemIntegrationTest1.settings"));
        SettingsMerger::mergeSettings(
                    QString("test-resources/libjoynrSystemIntegration1.settings"),
                    settings_1);
        runtime1 = new JoynrClusterControllerRuntime(NULL, settings_1);
        QSettings* settings_2 = SettingsMerger::mergeSettings(
                    QString("test-resources/SystemIntegrationTest2.settings"));
        SettingsMerger::mergeSettings(
                    QString("test-resources/libjoynrSystemIntegration2.settings"),
                    settings_2);
        runtime2 = new JoynrClusterControllerRuntime(NULL, settings_2);

        filterParameters.setCountry("Germany");
        filterParameters.setStartTime("4.00 pm");
    }