SammyVimes commented on a change in pull request #92:
URL: https://github.com/apache/ignite-3/pull/92#discussion_r612415052
##########
File path:
modules/network/src/integrationTest/java/org/apache/ignite/network/scalecube/ITScaleCubeNetworkMessagingTest.java
##########
@@ -88,13 +92,37 @@ public void messageWasSentToAllMembersSuccessfully() throws
Exception {
alice.messagingService().weakSend(member, testMessage);
}
- boolean done = latch.await(3, TimeUnit.SECONDS);
- assertTrue(done);
+ boolean messagesReceived = messageReceivedLatch.await(3,
TimeUnit.SECONDS);
+ assertTrue(messagesReceived);
//Then: All members successfully received message.
assertThat(getLastMessage(alice), is(testMessage));
assertThat(getLastMessage(bob), is(testMessage));
assertThat(getLastMessage(carol), is(testMessage));
+
+ CountDownLatch aliceShutdownLatch = new CountDownLatch(1);
+
+ bob.topologyService().addEventHandler(new TopologyEventHandler() {
+ /** {@inheritDoc} */
+ @Override public void onAppeared(ClusterNode member) {
+ // No-op.
+ }
+
+ /** {@inheritDoc} */
+ @Override public void onDisappeared(ClusterNode member) {
+ if (aliceName.equals(member.name()))
+ aliceShutdownLatch.countDown();
+ }
+ });
+
+ alice.shutdown();
+
+ boolean aliceShutdownReceived = aliceShutdownLatch.await(3,
TimeUnit.SECONDS);
+ assertTrue(aliceShutdownReceived);
+
+ Collection<ClusterNode> networkMembers =
bob.topologyService().allMembers();
Review comment:
I think this test is useless anyway and will be removed once we have a
proper networking
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]