You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2021/11/15 07:36:35 UTC

[GitHub] [cassandra] aratno commented on a change in pull request #1317: Cassandra 17143

aratno commented on a change in pull request #1317:
URL: https://github.com/apache/cassandra/pull/1317#discussion_r749065127



##########
File path: test/distributed/org/apache/cassandra/distributed/test/AbstractNetstatsStreaming.java
##########
@@ -523,6 +525,20 @@ public NetstatResults call() throws Exception
                         {
                             sawAnyStreamingOutput = true;
                         }
+                        else
+                        {
+                            // there is a race condition that streaming starts/stops between calls to netstats
+                            // to detect this, check to see if the node has completed a stream
+                            // expected log: [Stream (.*)?] All sessions completed
+                            LogResult<List<String>> logs = node.logs().grep(mark, "\\[Stream .*\\] All sessions completed");
+                            mark = logs.getMark();
+                            if (!logs.getResult().isEmpty())
+                            {
+                                // race condition detected...
+                                logger.warn("Test race condition detected where streaming started/stopped between calls to netstats");

Review comment:
       What do you hope a user does in response to this warning? Might be a nit, but I see this as INFO. Seems perfectly fine if a test runner is running slowly and finishes streaming before it can call netstat again, or if the test changes in the future so the streaming happens more quickly.




-- 
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-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org