himanshujindal commented on code in PR #4304: URL: https://github.com/apache/cassandra/pull/4304#discussion_r2301737992
########## test/unit/org/apache/cassandra/repair/autorepair/AutoRepairUtilsTest.java: ########## @@ -232,6 +236,52 @@ public void testGetHostIdsInCurrentRing_multiple_nodes() assertTrue(hosts.contains(hostId)); } + @Test + public void testHasMultipleLiveMajorVersionsWithSingleNode() + { + boolean result = AutoRepairUtils.hasMultipleLiveMajorVersions(); + assertFalse(result); + } + + @Test + public void testHasMultipleLiveMajorVersionsWithMultipleNodesOfSameVersion() + { + ClusterMetadataTestHelper.addEndpoint(2); + // Test the current behavior with the existing cluster setup + // In a single-node test environment, this should return false + boolean result = AutoRepairUtils.hasMultipleLiveMajorVersions(); + assertFalse(result); + } + + @Test + public void testHasMultipleLiveMajorVersionsWithMultipleNodesOfSameMajorVersionDifferentMinorVersions() + { + // add two nodes with cassandra 5 major version, but different minor version Review Comment: Fixed. -- 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-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org