jmckenzie-dev commented on code in PR #332:
URL: https://github.com/apache/cassandra-sidecar/pull/332#discussion_r3023601863


##########
server/src/test/java/org/apache/cassandra/sidecar/cdc/CdcManagerTest.java:
##########
@@ -291,24 +281,92 @@ void testUnknownInstanceHandlesGracefully() throws 
IOException
 
         List<SidecarCdc> consumers = spyManager.buildCdcConsumers();
 
-        // Assert - Should still create consumer with instanceId = -1
         assertThat(consumers).hasSize(1);
     }
 
     @Test
     void testResolveToSameAddressTrue()
     {
-        String address1 = "127.0.0.1";
-        String address2 = "localhost";
-        assertThat(CdcManager.resolveToSameAddress(address1, 
address2)).isTrue();
+        assertThat(resolveToSameAddress("127.0.0.1", "localhost")).isTrue();
     }
 
     @Test
     void testResolveToSameAddressFalse()
     {
-        String address1 = "127.0.0.1";
-        String address2 = "127.0.0.2";
-        assertThat(CdcManager.resolveToSameAddress(address1, 
address2)).isFalse();
+        assertThat(resolveToSameAddress("127.0.0.1", "127.0.0.2")).isFalse();
+    }
+
+    @Test
+    void testGetInstanceIdResolvesCorrectlyWhenIpAddressIsNull() throws 
IOException

Review Comment:
   We should comment this test to clarify its intent and how it differs from 
`testGetInstanceIdReturnsCorrectIdWhenIpAddressIsNull`. These 2 tests have very 
similar names and it's not clear how they differ at face value.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to