You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Yifan Cai (Jira)" <ji...@apache.org> on 2020/02/18 22:18:00 UTC

[jira] [Commented] (CASSANDRA-15338) Fix flakey testMessagePurging - org.apache.cassandra.net.ConnectionTest

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

Yifan Cai commented on CASSANDRA-15338:
---------------------------------------

The test failure reported here is caused by the flaky {{testAcquireReleaseOutbound}} in CASSANDRA-15308. 
After fixing {{testAcquireReleaseOutbound}}, all tests in {{ConnectionTest}} can pass happily. 

The repeated local runs of {{ConnectionTest}} using either Java 8 and 11 proved the test failure as described in this ticket did not show up. 

{code:java}
Switched to Java 8
12:42:00 in cassandra on CASSANDRA-15308
➜ while [[ "$(ant testclasslist -Dtest.classlistfile=<(echo org/apache/cassandra/net/ConnectionTest.java) | grep -c 'BUILD SUCCESSFUL')" == "1" ]]; do echo "It was a good run."; done
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
^C%
13:10:47 in cassandra on CASSANDRA-15308 took 28m 39s
➜ j11
Switched to Java 11
13:10:49 in cassandra on CASSANDRA-15308
➜  while [[ "$(ant testclasslist -Dtest.classlistfile=<(echo org/apache/cassandra/net/ConnectionTest.java) -Duse.jdk11=true | grep -c 'BUILD SUCCESSFUL')" == "1" ]]; do echo "It was a good run."; done
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
It was a good run.
^C%
{code}
 

> Fix flakey testMessagePurging - org.apache.cassandra.net.ConnectionTest
> -----------------------------------------------------------------------
>
>                 Key: CASSANDRA-15338
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15338
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/unit
>            Reporter: David Capwell
>            Priority: Normal
>             Fix For: 4.0-alpha
>
>
> Example failure: [https://circleci.com/gh/dcapwell/cassandra/11#artifacts/containers/1]
>   
> {code:java}
> Testcase: testMessagePurging(org.apache.cassandra.net.ConnectionTest):  FAILED
>  expected:<0> but was:<1>
>  junit.framework.AssertionFailedError: expected:<0> but was:<1>
>    at org.apache.cassandra.net.ConnectionTest.lambda$testMessagePurging$38(ConnectionTest.java:625)
>    at org.apache.cassandra.net.ConnectionTest.doTestManual(ConnectionTest.java:258)
>    at org.apache.cassandra.net.ConnectionTest.testManual(ConnectionTest.java:231)
>    at org.apache.cassandra.net.ConnectionTest.testMessagePurging(ConnectionTest.java:584){code}
>   
>  Looking closer at org.apache.cassandra.net.OutboundConnection.Delivery#stopAndRun it seems that the run method is called before org.apache.cassandra.net.OutboundConnection.Delivery#doRun which may lead to a test race condition where the CountDownLatch completes before executing



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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