sarankk commented on code in PR #151:
URL: 
https://github.com/apache/cassandra-analytics/pull/151#discussion_r2475495006


##########
cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/data/PartitionedDataLayerTests.java:
##########
@@ -392,4 +392,45 @@ private static void testSplitReplicas(CassandraRing ring,
             assertThat(replicaSet.primary().size() + 
replicaSet.backup().size()).isEqualTo(replicas.size());
         }
     }
+
+
+    /**
+     * Tests that the AvailabilityHint comparator correctly orders Cassandra 
nodes by availability priority:
+     * UP nodes first, then MOVING/LEAVING nodes, and finally 
DOWN/UNKNOWN/JOINING nodes last.
+     */
+    @Test
+    public void testSortingByAvailabilityHintComparator()
+    {
+        List<PartitionedDataLayer.AvailabilityHint> hints = Arrays.asList(UP, 
MOVING, LEAVING, UNKNOWN, JOINING, DOWN);
+
+        for (int i = 0; i < 5; i++)

Review Comment:
   Nit: Why do we loop through here? 



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