You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/05/31 23:28:17 UTC

[GitHub] [cassandra] jonmeredith commented on a diff in pull request #1649: CASSANDRA-17663 Ensure FileStreamTask cannot compromise shared channel proxy for system table when interrupted

jonmeredith commented on code in PR #1649:
URL: https://github.com/apache/cassandra/pull/1649#discussion_r886203192


##########
test/distributed/org/apache/cassandra/distributed/test/RepairErrorsTest.java:
##########
@@ -124,18 +128,57 @@ public void testRemoteSyncFailure() throws Exception
             result = cluster.get(1).nodetoolResult("repair", KEYSPACE);
             result.asserts().success();
 
-            // Make sure we've cleaned up sessions and parent sessions:
-            Integer parents = cluster.get(1).callOnInstance(() -> ActiveRepairService.instance.parentRepairSessionCount());
-            assertEquals(0, parents.intValue());
-            Integer sessions = cluster.get(1).callOnInstance(() -> ActiveRepairService.instance.sessionCount());
-            assertEquals(0, sessions.intValue());
+            assertNoActiveRepairSessions(cluster.get(1));
 
             cluster.forEach(i -> Assertions.assertThat(i.logs().grep("SomeRepairFailedException").getResult())
                                            .describedAs("node%d logged hidden exception org.apache.cassandra.repair.SomeRepairFailedException", i.config().num())
                                            .isEmpty());
         }
     }
 
+    @Test
+    public void testRemoteStreamFailure() throws Exception
+    {
+        try (Cluster cluster = init(Cluster.build(3)
+                                           .withConfig(config -> config.with(GOSSIP)

Review Comment:
   nit: Do you mind adding a comment why NETWORK is not needed for a test that looks like it needs streaming for repair to work?  I think the answer is because it isn't necessary for the test as ByteBuddy intercepts.



-- 
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.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org