use of joynr.MutableMessage in project joynr by bmwcarit.
the class TtlUpliftTest method testTtlUpliftMs_Publication.
@Test
public void testTtlUpliftMs_Publication() {
SubscriptionPublication subscriptionPublication = new SubscriptionPublication();
expiryDate = DispatcherUtils.convertTtlToExpirationDate(messagingQos.getRoundTripTtl_ms());
MutableMessage message = messageFactoryWithTtlUplift.createPublication(fromParticipantId, toParticipantId, subscriptionPublication, messagingQos);
long expiryDateValue = expiryDate.getValue() + TTL_UPLIFT_MS;
MutableMessageFactoryTest.assertExpiryDateEquals(expiryDateValue, message);
}
use of joynr.MutableMessage in project joynr by bmwcarit.
the class TtlUpliftTest method testTtlUpliftMs_OneWayRequest.
@Test
public void testTtlUpliftMs_OneWayRequest() {
expiryDate = DispatcherUtils.convertTtlToExpirationDate(messagingQos.getRoundTripTtl_ms());
MutableMessage message = messageFactoryWithTtlUplift.createOneWayRequest(fromParticipantId, toParticipantId, request, messagingQos);
long expiryDateValue = expiryDate.getValue() + TTL_UPLIFT_MS;
MutableMessageFactoryTest.assertExpiryDateEquals(expiryDateValue, message);
}
use of joynr.MutableMessage in project joynr by bmwcarit.
the class TtlUpliftTest method testTtlUpliftMs_Request.
@Test
public void testTtlUpliftMs_Request() {
expiryDate = DispatcherUtils.convertTtlToExpirationDate(messagingQos.getRoundTripTtl_ms());
MutableMessage message = messageFactoryWithTtlUplift.createRequest(fromParticipantId, toParticipantId, request, messagingQos);
long expiryDateValue = expiryDate.getValue() + TTL_UPLIFT_MS;
MutableMessageFactoryTest.assertExpiryDateEquals(expiryDateValue, message);
}
use of joynr.MutableMessage in project joynr by bmwcarit.
the class TtlUpliftTest method testTtlUpliftMsWithLargeTtl.
@Test
public void testTtlUpliftMsWithLargeTtl() {
MessagingQos messagingQos = new MessagingQos(LARGE_EXPIRY_DATE_MS);
MutableMessage message = messageFactoryWithTtlUplift.createRequest(fromParticipantId, toParticipantId, request, messagingQos);
long expiryDateValue = LARGE_EXPIRY_DATE_MS;
MutableMessageFactoryTest.assertExpiryDateEquals(expiryDateValue, message);
messagingQos = new MessagingQos(LARGE_EXPIRY_DATE_MS - TTL_UPLIFT_MS);
message = messageFactoryWithTtlUplift.createRequest(fromParticipantId, toParticipantId, request, messagingQos);
MutableMessageFactoryTest.assertExpiryDateEquals(expiryDateValue, message);
messagingQos = new MessagingQos(LARGE_EXPIRY_DATE_MS - TTL_UPLIFT_MS - System.currentTimeMillis());
message = messageFactoryWithTtlUplift.createRequest(fromParticipantId, toParticipantId, request, messagingQos);
MutableMessageFactoryTest.assertExpiryDateEquals(expiryDateValue, message);
messagingQos = new MessagingQos(LARGE_EXPIRY_DATE_MS - TTL_UPLIFT_MS - System.currentTimeMillis() + 1);
message = messageFactoryWithTtlUplift.createRequest(fromParticipantId, toParticipantId, request, messagingQos);
MutableMessageFactoryTest.assertExpiryDateEquals(expiryDateValue, message);
}
use of joynr.MutableMessage in project joynr by bmwcarit.
the class TtlUpliftTest method testTtlUpliftMs_Multicast.
@Test
public void testTtlUpliftMs_Multicast() {
MulticastPublication multicastPublication = new MulticastPublication();
expiryDate = DispatcherUtils.convertTtlToExpirationDate(messagingQos.getRoundTripTtl_ms());
MutableMessage message = messageFactoryWithTtlUplift.createMulticast(fromParticipantId, multicastPublication, messagingQos);
long expiryDateValue = expiryDate.getValue() + TTL_UPLIFT_MS;
MutableMessageFactoryTest.assertExpiryDateEquals(expiryDateValue, message);
}
Aggregations