use of joynr.MulticastSubscriptionQos in project joynr by bmwcarit.
the class AbstractBroadcastEnd2EndTest method subscribeToBroadcastMultipleOutputs.
@Ignore
@Test(timeout = CONST_DEFAULT_TEST_TIMEOUT)
public void subscribeToBroadcastMultipleOutputs() throws InterruptedException {
final Semaphore broadcastReceived = new Semaphore(0);
proxy.subscribeToLocationUpdateWithSpeedBroadcast(new testBroadcastInterface.LocationUpdateWithSpeedBroadcastAdapter() {
@Override
public void onReceive(GpsLocation location, Float speed) {
assertEquals(expectedLocation, location);
assertEquals(expectedSpeed, speed);
broadcastReceived.release();
}
}, new MulticastSubscriptionQos());
Thread.sleep(300);
provider.fireLocationUpdateWithSpeed(expectedLocation, expectedSpeed);
broadcastReceived.acquire();
}
use of joynr.MulticastSubscriptionQos in project joynr by bmwcarit.
the class AbstractBroadcastEnd2EndTest method subscribeToBroadcastWithEnumOutput.
@Ignore
@Test(timeout = CONST_DEFAULT_TEST_TIMEOUT)
public void subscribeToBroadcastWithEnumOutput() throws InterruptedException {
final Semaphore broadcastReceived = new Semaphore(0);
final TestEnum expectedTestEnum = TestEnum.TWO;
proxy.subscribeToBroadcastWithEnumOutputBroadcast(new testBroadcastInterface.BroadcastWithEnumOutputBroadcastAdapter() {
@Override
public void onReceive(TestEnum testEnum) {
assertEquals(expectedTestEnum, testEnum);
broadcastReceived.release();
}
@Override
public void onError(SubscriptionException error) {
fail("Error subscribing to broadcast");
}
}, new MulticastSubscriptionQos());
Thread.sleep(300);
provider.fireBroadcastWithEnumOutput(expectedTestEnum);
broadcastReceived.acquire();
}
Aggregations