use of joynr.tests.testBroadcastInterface.BroadcastWithMapParametersBroadcastAdapter in project joynr by bmwcarit.
the class AbstractProviderProxyEnd2EndTest method testBroadcastWithMapParameter.
@Ignore
@Test(timeout = CONST_DEFAULT_TEST_TIMEOUT)
public void testBroadcastWithMapParameter() throws DiscoveryException, JoynrIllegalStateException, InterruptedException {
final Semaphore broadcastReceived = new Semaphore(0);
ProxyBuilder<testProxy> proxyBuilder = consumerRuntime.getProxyBuilder(domain, testProxy.class);
testProxy proxy = proxyBuilder.setMessagingQos(messagingQos).setDiscoveryQos(discoveryQos).build();
final TStringKeyMap mapParam = new TStringKeyMap();
mapParam.put("key", "value");
proxy.subscribeToBroadcastWithMapParametersBroadcast(new BroadcastWithMapParametersBroadcastAdapter() {
@Override
public void onReceive(TStringKeyMap receivedMapParam) {
assertEquals(mapParam, receivedMapParam);
broadcastReceived.release();
}
}, new MulticastSubscriptionQos());
// wait to allow the subscription request to arrive at the provider
getSubscriptionTestsPublisher().waitForBroadcastSubscription();
provider.fireBroadcastWithMapParameters(mapParam);
broadcastReceived.acquire();
}
Aggregations