use of io.aeron.test.launcher.RemoteLaunchClient in project Aeron by real-logic.
the class ClusterNetworkTopologyTest method shouldGetEchoFromCluster.
@ParameterizedTest
@MethodSource("provideTopologyConfigurations")
@InterruptAfter(60)
void shouldGetEchoFromCluster(final List<String> hostnames, final List<String> internalHostnames, final String ingressChannel, final String logChannel) throws Exception {
assertNotNull(hostnames);
assertEquals(3, hostnames.size());
setupDataCollection(3);
final String ingressEndpoints = ingressChannel.contains("endpoint") ? null : BasicAuctionClusterClient.ingressEndpoints(hostnames);
try (RemoteLaunchClient remote0 = RemoteLaunchClient.connect(hostnames.get(0), REMOTE_LAUNCH_PORT);
RemoteLaunchClient remote1 = RemoteLaunchClient.connect(hostnames.get(1), REMOTE_LAUNCH_PORT);
RemoteLaunchClient remote2 = RemoteLaunchClient.connect(hostnames.get(2), REMOTE_LAUNCH_PORT)) {
final Selector selector = Selector.open();
launchNode(hostnames, internalHostnames, ingressChannel, logChannel, remote0, selector, 0);
launchNode(hostnames, internalHostnames, ingressChannel, logChannel, remote1, selector, 1);
launchNode(hostnames, internalHostnames, ingressChannel, logChannel, remote2, selector, 2);
connectAndSendMessages(ingressChannel, ingressEndpoints, selector, 1);
}
}
use of io.aeron.test.launcher.RemoteLaunchClient in project aeron by real-logic.
the class ClusterNetworkTopologyTest method shouldLogReplicate.
@ParameterizedTest
@MethodSource("singleTopologyConfigurations")
@InterruptAfter(60)
void shouldLogReplicate(final List<String> hostnames, final List<String> internalHostnames, final String ingressChannel, final String logChannel) throws Exception {
assertNotNull(hostnames);
assertEquals(3, hostnames.size());
setupDataCollection(3);
final String ingressEndpoints = ingressChannel.contains("endpoint") ? null : BasicAuctionClusterClient.ingressEndpoints(hostnames);
try (RemoteLaunchClient remote0 = RemoteLaunchClient.connect(hostnames.get(0), REMOTE_LAUNCH_PORT);
RemoteLaunchClient remote1 = RemoteLaunchClient.connect(hostnames.get(1), REMOTE_LAUNCH_PORT)) {
final Selector selector = Selector.open();
launchNode(hostnames, internalHostnames, ingressChannel, logChannel, remote0, selector, 0);
launchNode(hostnames, internalHostnames, ingressChannel, logChannel, remote1, selector, 1);
connectAndSendMessages(ingressChannel, ingressEndpoints, selector, 10);
}
Thread.sleep(5_000);
try (RemoteLaunchClient remote0 = RemoteLaunchClient.connect(hostnames.get(0), REMOTE_LAUNCH_PORT);
RemoteLaunchClient remote2 = RemoteLaunchClient.connect(hostnames.get(2), REMOTE_LAUNCH_PORT)) {
final Selector selector = Selector.open();
launchNode(hostnames, internalHostnames, ingressChannel, logChannel, remote0, selector, 0);
launchNode(hostnames, internalHostnames, ingressChannel, logChannel, remote2, selector, 2);
connectAndSendMessages(ingressChannel, ingressEndpoints, selector, 10);
}
}
use of io.aeron.test.launcher.RemoteLaunchClient in project aeron by real-logic.
the class ClusterNetworkTopologyTest method shouldGetEchoFromCluster.
@ParameterizedTest
@MethodSource("provideTopologyConfigurations")
@InterruptAfter(60)
void shouldGetEchoFromCluster(final List<String> hostnames, final List<String> internalHostnames, final String ingressChannel, final String logChannel) throws Exception {
assertNotNull(hostnames);
assertEquals(3, hostnames.size());
setupDataCollection(3);
final String ingressEndpoints = ingressChannel.contains("endpoint") ? null : BasicAuctionClusterClient.ingressEndpoints(hostnames);
try (RemoteLaunchClient remote0 = RemoteLaunchClient.connect(hostnames.get(0), REMOTE_LAUNCH_PORT);
RemoteLaunchClient remote1 = RemoteLaunchClient.connect(hostnames.get(1), REMOTE_LAUNCH_PORT);
RemoteLaunchClient remote2 = RemoteLaunchClient.connect(hostnames.get(2), REMOTE_LAUNCH_PORT)) {
final Selector selector = Selector.open();
launchNode(hostnames, internalHostnames, ingressChannel, logChannel, remote0, selector, 0);
launchNode(hostnames, internalHostnames, ingressChannel, logChannel, remote1, selector, 1);
launchNode(hostnames, internalHostnames, ingressChannel, logChannel, remote2, selector, 2);
connectAndSendMessages(ingressChannel, ingressEndpoints, selector, 1);
}
}
use of io.aeron.test.launcher.RemoteLaunchClient in project Aeron by real-logic.
the class ClusterNetworkTopologyTest method shouldLogReplicate.
@ParameterizedTest
@MethodSource("singleTopologyConfigurations")
@InterruptAfter(60)
void shouldLogReplicate(final List<String> hostnames, final List<String> internalHostnames, final String ingressChannel, final String logChannel) throws Exception {
assertNotNull(hostnames);
assertEquals(3, hostnames.size());
setupDataCollection(3);
final String ingressEndpoints = ingressChannel.contains("endpoint") ? null : BasicAuctionClusterClient.ingressEndpoints(hostnames);
try (RemoteLaunchClient remote0 = RemoteLaunchClient.connect(hostnames.get(0), REMOTE_LAUNCH_PORT);
RemoteLaunchClient remote1 = RemoteLaunchClient.connect(hostnames.get(1), REMOTE_LAUNCH_PORT)) {
final Selector selector = Selector.open();
launchNode(hostnames, internalHostnames, ingressChannel, logChannel, remote0, selector, 0);
launchNode(hostnames, internalHostnames, ingressChannel, logChannel, remote1, selector, 1);
connectAndSendMessages(ingressChannel, ingressEndpoints, selector, 10);
}
Thread.sleep(5_000);
try (RemoteLaunchClient remote0 = RemoteLaunchClient.connect(hostnames.get(0), REMOTE_LAUNCH_PORT);
RemoteLaunchClient remote2 = RemoteLaunchClient.connect(hostnames.get(2), REMOTE_LAUNCH_PORT)) {
final Selector selector = Selector.open();
launchNode(hostnames, internalHostnames, ingressChannel, logChannel, remote0, selector, 0);
launchNode(hostnames, internalHostnames, ingressChannel, logChannel, remote2, selector, 2);
connectAndSendMessages(ingressChannel, ingressEndpoints, selector, 10);
}
}
Aggregations