Search in sources :

Example 6 with DummyJoynrApplication

use of io.joynr.integration.util.DummyJoynrApplication in project joynr by bmwcarit.

the class SubscriptionEnd2EndTest method getRuntime.

@Override
protected JoynrRuntime getRuntime(Properties joynrConfig, Module... modules) {
    Module runtimeModule = Modules.override(new CCInProcessRuntimeModule()).with(new AtmosphereMessagingModule());
    Module modulesWithRuntime = Modules.override(modules).with(runtimeModule);
    DummyJoynrApplication application = (DummyJoynrApplication) new JoynrInjectorFactory(joynrConfig, modulesWithRuntime).createApplication(DummyJoynrApplication.class);
    dummyApplications.add(application);
    return application.getRuntime();
}
Also used : DummyJoynrApplication(io.joynr.integration.util.DummyJoynrApplication) CCInProcessRuntimeModule(io.joynr.runtime.CCInProcessRuntimeModule) Module(com.google.inject.Module) AtmosphereMessagingModule(io.joynr.messaging.AtmosphereMessagingModule) CCInProcessRuntimeModule(io.joynr.runtime.CCInProcessRuntimeModule) AtmosphereMessagingModule(io.joynr.messaging.AtmosphereMessagingModule) JoynrInjectorFactory(io.joynr.runtime.JoynrInjectorFactory)

Example 7 with DummyJoynrApplication

use of io.joynr.integration.util.DummyJoynrApplication in project joynr by bmwcarit.

the class ShortCircuitTest method setup.

@Before
public void setup() throws Exception {
    Module runtimeModule = Modules.override(new CCInProcessRuntimeModule()).with(new TestGlobalAddressModule());
    Properties joynrConfig = new Properties();
    DummyJoynrApplication application = (DummyJoynrApplication) new JoynrInjectorFactory(joynrConfig, runtimeModule).createApplication(DummyJoynrApplication.class);
    runtime = application.getRuntime();
    DiscoveryQos discoveryQos = new DiscoveryQos(CONST_DEFAULT_TEST_TIMEOUT, ArbitrationStrategy.HighestPriority, DiscoveryQos.NO_MAX_AGE, DiscoveryScope.LOCAL_ONLY);
    ProxyBuilder<EchoProxy> proxyBuilder = runtime.getProxyBuilder(DOMAIN, EchoProxy.class).setDiscoveryQos(discoveryQos);
    echoProxy = proxyBuilder.build();
    EchoProvider echoProvider = new EchoProviderImpl();
    ProviderQos providerQos = new ProviderQos();
    providerQos.setPriority(System.currentTimeMillis());
    providerQos.setScope(ProviderScope.LOCAL);
    runtime.registerProvider(DOMAIN, echoProvider, providerQos);
    // warmup
    for (int i = 0; i < 100; i++) {
        echoProxy.echoString("warmup");
        echoProxy.echoByteArray(new Byte[1]);
    }
}
Also used : TestGlobalAddressModule(io.joynr.messaging.routing.TestGlobalAddressModule) DummyJoynrApplication(io.joynr.integration.util.DummyJoynrApplication) EchoProvider(joynr.tests.performance.EchoProvider) Properties(java.util.Properties) DiscoveryQos(io.joynr.arbitration.DiscoveryQos) JoynrInjectorFactory(io.joynr.runtime.JoynrInjectorFactory) CCInProcessRuntimeModule(io.joynr.runtime.CCInProcessRuntimeModule) Module(com.google.inject.Module) TestGlobalAddressModule(io.joynr.messaging.routing.TestGlobalAddressModule) CCInProcessRuntimeModule(io.joynr.runtime.CCInProcessRuntimeModule) AbstractModule(com.google.inject.AbstractModule) EchoProxy(joynr.tests.performance.EchoProxy) ProviderQos(joynr.types.ProviderQos) Before(org.junit.Before)

Example 8 with DummyJoynrApplication

use of io.joynr.integration.util.DummyJoynrApplication in project joynr by bmwcarit.

the class SSLEnd2EndTest method getRuntime.

@Override
protected JoynrRuntime getRuntime(Properties joynrConfig, Module... modules) {
    DummyJoynrApplication application = (DummyJoynrApplication) new JoynrInjectorFactory(joynrConfig, modules).createApplication(DummyJoynrApplication.class);
    dummyApplications.add(application);
    return application.getRuntime();
}
Also used : DummyJoynrApplication(io.joynr.integration.util.DummyJoynrApplication) JoynrInjectorFactory(io.joynr.runtime.JoynrInjectorFactory)

Example 9 with DummyJoynrApplication

use of io.joynr.integration.util.DummyJoynrApplication in project joynr by bmwcarit.

the class HTTPProviderProxyEnd2EndTest method getRuntime.

@Override
protected JoynrRuntime getRuntime(Properties joynrConfig, Module... modules) {
    Module runtimeModule = Modules.override(new CCInProcessRuntimeModule()).with(new AtmosphereMessagingModule());
    Module modulesWithRuntime = Modules.override(modules).with(runtimeModule);
    DummyJoynrApplication application = (DummyJoynrApplication) new JoynrInjectorFactory(joynrConfig, modulesWithRuntime).createApplication(DummyJoynrApplication.class);
    return application.getRuntime();
}
Also used : DummyJoynrApplication(io.joynr.integration.util.DummyJoynrApplication) CCInProcessRuntimeModule(io.joynr.runtime.CCInProcessRuntimeModule) Module(com.google.inject.Module) AtmosphereMessagingModule(io.joynr.messaging.AtmosphereMessagingModule) CCInProcessRuntimeModule(io.joynr.runtime.CCInProcessRuntimeModule) AtmosphereMessagingModule(io.joynr.messaging.AtmosphereMessagingModule) JoynrInjectorFactory(io.joynr.runtime.JoynrInjectorFactory)

Example 10 with DummyJoynrApplication

use of io.joynr.integration.util.DummyJoynrApplication in project joynr by bmwcarit.

the class SubscriptionEnd2EndTest method tearDown.

@Override
@After
public void tearDown() throws InterruptedException {
    super.tearDown();
    for (DummyJoynrApplication application : dummyApplications) {
        application.shutdown();
    }
    dummyApplications.clear();
}
Also used : DummyJoynrApplication(io.joynr.integration.util.DummyJoynrApplication) After(org.junit.After)

Aggregations

DummyJoynrApplication (io.joynr.integration.util.DummyJoynrApplication)12 JoynrInjectorFactory (io.joynr.runtime.JoynrInjectorFactory)10 Module (com.google.inject.Module)9 CCInProcessRuntimeModule (io.joynr.runtime.CCInProcessRuntimeModule)8 AbstractModule (com.google.inject.AbstractModule)4 MqttPahoModule (io.joynr.messaging.mqtt.paho.client.MqttPahoModule)4 Properties (java.util.Properties)4 AtmosphereMessagingModule (io.joynr.messaging.AtmosphereMessagingModule)3 MqttModule (io.joynr.messaging.mqtt.MqttModule)3 TestGlobalAddressModule (io.joynr.messaging.routing.TestGlobalAddressModule)2 After (org.junit.After)2 DiscoveryQos (io.joynr.arbitration.DiscoveryQos)1 RawMessagingPreprocessor (io.joynr.messaging.RawMessagingPreprocessor)1 WebsocketModule (io.joynr.messaging.websocket.WebsocketModule)1 CCWebSocketRuntimeModule (io.joynr.runtime.CCWebSocketRuntimeModule)1 ClusterControllerRuntimeModule (io.joynr.runtime.ClusterControllerRuntimeModule)1 LibjoynrWebSocketRuntimeModule (io.joynr.runtime.LibjoynrWebSocketRuntimeModule)1 Map (java.util.Map)1 EchoProvider (joynr.tests.performance.EchoProvider)1 EchoProxy (joynr.tests.performance.EchoProxy)1