diff --git a/tests/integration/long/test_loadbalancingpolicies.py b/tests/integration/long/test_loadbalancingpolicies.py index f6aadd3e..c92bf640 100644 --- a/tests/integration/long/test_loadbalancingpolicies.py +++ b/tests/integration/long/test_loadbalancingpolicies.py @@ -701,9 +701,15 @@ class LoadBalancingPolicyTests(unittest.TestCase): self._insert(session, keyspace) self._query(session, keyspace) - self.coordinator_stats.assert_query_count_equals(self, 1, 8) + # RoundRobin doesn't provide a gurantee on the order of the hosts + # so we will have that for 127.0.0.1 and 127.0.0.3 the count for one + # will be 4 and for the other 8 + first_node_count = self.coordinator_stats.get_query_count(1) + third_node_count = self.coordinator_stats.get_query_count(3) + self.assertEqual(first_node_count + third_node_count, 12) + self.assertTrue(first_node_count == 8 or first_node_count == 4) + self.coordinator_stats.assert_query_count_equals(self, 2, 0) - self.coordinator_stats.assert_query_count_equals(self, 3, 4) # policy should not allow reconnecting to ignored host force_stop(2)