absurdfarce commented on code in PR #1281:
URL: 
https://github.com/apache/cassandra-python-driver/pull/1281#discussion_r2978077215


##########
tests/integration/standard/test_cluster.py:
##########
@@ -996,7 +996,8 @@ def test_clone_shared_lbp(self):
         exec_profiles = {'rr1': rr1}
         with TestCluster(execution_profiles=exec_profiles) as cluster:
             session = cluster.connect(wait_for_all_pools=True)
-            self.assertGreater(len(cluster.metadata.all_hosts()), 1, "We only 
have one host connected at this point")
+            if len(cluster.metadata.all_hosts()) <= 1:
+                raise unittest.SkipTest("This test requires multiple connected 
hosts")

Review Comment:
   I don't think we want to silently skip tests here if we're not able to 
connect to the nodes.  These tests are all 
[configured](https://github.com/apache/cassandra-python-driver/blob/3.29.3/tests/integration/standard/test_cluster.py#L51)
 to use a three-node ccm cluster and since we also wait on all connection pools 
to complete before returning (note the "wait_for_all_pools" arg to the 
connect() call) we _should_ always have at least three connections here.  If we 
don't something's gone quite wrong (or our test setup is bogus) so we should 
provide some feedback to the test runner to indicate that fact rather than 
silently skipping this test.
   
   As an example: I ran this test locally and saw it pass right away.  It's 
also been passing in all our Jenkins runs.  If you're seeing local failures 
@Ya-Sabyr it's probably something that should be investigated more completely 
rather than skipped.



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