Search in sources :

Example 1 with SubscriptionTestsProviderImpl

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);
}
Also used : SubscriptionTestsProviderImpl(io.joynr.dispatching.subscription.SubscriptionTestsProviderImpl) Properties(java.util.Properties) StaticDomainAccessControlProvisioningModule(io.joynr.accesscontrol.StaticDomainAccessControlProvisioningModule)

Example 2 with SubscriptionTestsProviderImpl

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();
}
Also used : MessagingQos(io.joynr.messaging.MessagingQos) SubscriptionTestsProviderImpl(io.joynr.dispatching.subscription.SubscriptionTestsProviderImpl) joynr.tests.testProxy(joynr.tests.testProxy) Properties(java.util.Properties) ProviderQos(joynr.types.ProviderQos) DiscoveryQos(io.joynr.arbitration.DiscoveryQos) Before(org.junit.Before)

Aggregations

SubscriptionTestsProviderImpl (io.joynr.dispatching.subscription.SubscriptionTestsProviderImpl)2 Properties (java.util.Properties)2 StaticDomainAccessControlProvisioningModule (io.joynr.accesscontrol.StaticDomainAccessControlProvisioningModule)1 DiscoveryQos (io.joynr.arbitration.DiscoveryQos)1 MessagingQos (io.joynr.messaging.MessagingQos)1 joynr.tests.testProxy (joynr.tests.testProxy)1 ProviderQos (joynr.types.ProviderQos)1 Before (org.junit.Before)1