use of io.joynr.dispatching.subscription.SubscriptionTestsProviderImpl in project joynr by bmwcarit.
the class AbstractSubscriptionEnd2EndTest method setupProviderRuntime.
private void setupProviderRuntime(String methodName) throws InterruptedException, ApplicationException {
Properties factoryPropertiesProvider;
String channelIdProvider = "JavaTest-" + UUID.randomUUID().getLeastSignificantBits() + "-Provider-SubscriptionEnd2EndTest-" + methodName;
factoryPropertiesProvider = PropertyLoader.loadProperties("testMessaging.properties");
factoryPropertiesProvider.put(MessagingPropertyKeys.CHANNELID, channelIdProvider);
factoryPropertiesProvider.put(MessagingPropertyKeys.RECEIVERID, UUID.randomUUID().toString());
factoryPropertiesProvider.put(AbstractJoynrApplication.PROPERTY_JOYNR_DOMAIN_LOCAL, domain);
providerRuntime = getRuntime(factoryPropertiesProvider, getSubscriptionPublisherFactoryModule(), new StaticDomainAccessControlProvisioningModule());
provider = new SubscriptionTestsProviderImpl();
providerQos.setPriority(System.currentTimeMillis());
providerRuntime.registerProvider(domain, provider, providerQos).get(CONST_DEFAULT_TEST_TIMEOUT);
}
use of io.joynr.dispatching.subscription.SubscriptionTestsProviderImpl in project joynr by bmwcarit.
the class AbstractLocalCommunicationTest method setUp.
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
logger.info("setup beginning...");
String channelId = UUID.randomUUID().toString() + "-end2endA";
Properties customProperties = new Properties();
customProperties.put(MessagingPropertyKeys.CHANNELID, channelId);
runtimeA = getRuntime(customProperties);
provider = new SubscriptionTestsProviderImpl();
domain = "TestDomain" + System.currentTimeMillis();
ProviderQos providerQos = new ProviderQos();
runtimeA.registerProvider(domain, provider, providerQos);
ProxyBuilder<testProxy> proxyBuilder;
MessagingQos messagingQos = new MessagingQos(20000);
DiscoveryQos discoveryQos = new DiscoveryQos(50000, ArbitrationStrategy.HighestPriority, Long.MAX_VALUE);
proxyBuilder = runtimeA.getProxyBuilder(domain, testProxy.class);
proxy = proxyBuilder.setMessagingQos(messagingQos).setDiscoveryQos(discoveryQos).build();
}
Aggregations