[ 
https://issues.apache.org/jira/browse/CASSANDRA-15630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17058987#comment-17058987
 ] 

Yifan Cai commented on CASSANDRA-15630:
---------------------------------------

After going through the source, the test failure looks only caused by improper 
barrier set in the test itself. Not an implementation bug. 

The countdown latch gets released in the verb handler. And the processed count 
increment happens _after_ it. Therefore, there is a chance that the test is 
signaled to proceed to assertions, meanwhile the processed count has not been 
updated yet. 

Since there is no easy way to register a callback after the processed count 
increment, I am proposing a patch that adds a {{longCheck()}} method, which 
repeatedly run checks within the specified timeout until passing. 

I have run the test locally in a docker container and the test failure cannot 
be reproduced.

PR: [https://github.com/apache/cassandra/pull/470]

I think the failures reported in the other 2 JIRAs, CASSANDRA-15628 and 
CASSANDRA-15629, are caused by the same reason. Changing the {{check()}} to 
{{longCheck()}}in those 2 tests should fix.

> 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
>            Priority: Normal
>             Fix For: 4.0-beta
>
>
> 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

Reply via email to