[ https://issues.apache.org/jira/browse/CASSANDRA-15630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17066885#comment-17066885 ]
Benjamin Lerer commented on CASSANDRA-15630: -------------------------------------------- Based on what I can see, we have some race conditions on several tests and the check for {{scheduledCount}} in {{ConnectionUtils}} is also expecting some race conditions. I strongly suspect that we might not have not found yet all the race conditions. Rather than having a {{checkLong}} method for tests that we found out are racy, I would prefer to assume that all the tests could be racy and fix the {{check}} method. We already have an utility method to handle racy operation: {{Util.spinAssertEquals}}. Rather than developing a new solution I would add a new version that accept a message in its signature and use it in {{ConnectionUtils}} in place of {{Assert.assertEquals}}. There are a few refactoring to do along the way but I believe that it should be doable. > Fix flakey testSerializeError - org.apache.cassandra.net.ConnectionTest > ----------------------------------------------------------------------- > > Key: CASSANDRA-15630 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15630 > Project: Cassandra > Issue Type: Bug > Components: Test/unit > Reporter: Yifan Cai > Assignee: Yifan Cai > Priority: Normal > Labels: pull-request-available > Fix For: 4.0-beta > > Time Spent: 50m > Remaining Estimate: 0h > > The test fails sometimes with the following error message and trace. > {code:java} > processed count values don't match expected:<90> but was:<89> > junit.framework.AssertionFailedError: processed count values don't match > expected:<90> but was:<89> > at > org.apache.cassandra.net.ConnectionUtils$InboundCountChecker.doCheck(ConnectionUtils.java:217) > at > org.apache.cassandra.net.ConnectionUtils$InboundCountChecker.check(ConnectionUtils.java:200) > at > org.apache.cassandra.net.ConnectionTest.lambda$testSerializeError$24(ConnectionTest.java:494) > at > org.apache.cassandra.net.ConnectionTest.lambda$doTest$8(ConnectionTest.java:240) > at > org.apache.cassandra.net.ConnectionTest.doTestManual(ConnectionTest.java:260) > at org.apache.cassandra.net.ConnectionTest.doTest(ConnectionTest.java:238) > at org.apache.cassandra.net.ConnectionTest.test(ConnectionTest.java:227) > at > org.apache.cassandra.net.ConnectionTest.testSerializeError(ConnectionTest.java:435){code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org