use of io.joynr.integration.util.DummyJoynrApplication in project joynr by bmwcarit.
the class WebSocketProviderProxyEnd2EndTest method getRuntime.
@Override
protected JoynrRuntime getRuntime(final Properties joynrConfig, final Module... modules) {
if (ccJoynrRuntime == null) {
ccJoynrRuntime = createClusterController(webSocketConfig);
createdRuntimes.add(ccJoynrRuntime);
}
joynrConfig.putAll(webSocketConfig);
joynrConfig.putAll(baseTestConfig);
joynrConfig.setProperty(ConfigurableMessagingSettings.PROPERTY_CC_CONNECTION_TYPE, "WEBSOCKET");
Module modulesWithRuntime = Modules.override(modules).with(Modules.override(new LibjoynrWebSocketRuntimeModule()).with(new AbstractModule() {
@Override
protected void configure() {
// shorten reconnect delay to speed up tests
bind(long.class).annotatedWith(Names.named(WebsocketModule.PROPERTY_WEBSOCKET_MESSAGING_RECONNECT_DELAY)).toInstance(100L);
}
}));
DummyJoynrApplication application = (DummyJoynrApplication) new JoynrInjectorFactory(joynrConfig, modulesWithRuntime).createApplication(DummyJoynrApplication.class);
return application.getRuntime();
}
use of io.joynr.integration.util.DummyJoynrApplication in project joynr by bmwcarit.
the class AccessControllerEnd2EndTest method createRuntime.
private JoynrRuntime createRuntime() {
Properties properties = new Properties();
properties.put(MqttModule.PROPERTY_KEY_MQTT_BROKER_URI, "tcp://localhost:1883");
properties.put(MessagingPropertyKeys.PROPERTY_MESSAGING_PRIMARYGLOBALTRANSPORT, "mqtt");
Module module = Modules.override(new CCInProcessRuntimeModule()).with(new AbstractModule() {
@Override
protected void configure() {
bindConstant().annotatedWith(Names.named(ClusterControllerRuntimeModule.PROPERTY_ACCESSCONTROL_ENABLE)).to(true);
}
}, new MqttPahoModule());
DummyJoynrApplication app = (DummyJoynrApplication) new JoynrInjectorFactory(properties, module).createApplication(DummyJoynrApplication.class);
return app.getRuntime();
}
Aggregations