use of io.aeron.exceptions.RegistrationException in project Aeron by real-logic.
the class ChannelValidationTests method shouldNotAllowUriParametersForManualMdc.
@ParameterizedTest
@ValueSource(strings = { "mtu", "rcv-wnd", "so-rcvbuf", "so-sndbuf" })
void shouldNotAllowUriParametersForManualMdc(final String parameter) {
launch();
final Publication publication = addPublication("aeron:udp?control-mode=manual", 1000);
final RegistrationException registrationException = assertThrows(RegistrationException.class, () -> publication.addDestination("aeron:udp?endpoint=localhost:9999|" + parameter + "=4096"));
assertThat(registrationException.getMessage(), containsString(parameter));
}
use of io.aeron.exceptions.RegistrationException in project Aeron by real-logic.
the class MultiDestinationCastTest method addDestinationWithSpySubscriptionsShouldFailWithRegistrationException.
@Test
@InterruptAfter(10)
void addDestinationWithSpySubscriptionsShouldFailWithRegistrationException() {
final ErrorHandler mockErrorHandler = mock(ErrorHandler.class);
launch(mockErrorHandler);
publication = clientA.addPublication(PUB_MDC_MANUAL_URI, STREAM_ID);
final RegistrationException registrationException = assertThrows(RegistrationException.class, () -> publication.addDestination(CommonContext.SPY_PREFIX + PUB_MDC_DYNAMIC_URI));
assertThat(registrationException.getMessage(), containsString("spies are invalid"));
}
use of io.aeron.exceptions.RegistrationException in project Aeron by real-logic.
the class ChannelValidationTests method shouldNotAllowUriParametersForManualMds.
@ParameterizedTest
@ValueSource(strings = { "mtu", "rcv-wnd", "so-rcvbuf", "so-sndbuf" })
void shouldNotAllowUriParametersForManualMds(final String parameter) {
launch();
final Subscription subscription = addSubscription("aeron:udp?control-mode=manual", 1000);
final RegistrationException registrationException = assertThrows(RegistrationException.class, () -> subscription.addDestination("aeron:udp?endpoint=localhost:9999|" + parameter + "=4096"));
assertThat(registrationException.getMessage(), containsString(parameter));
}
Aggregations