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/08/04 20:26: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=17171101#comment-17171101 ] 

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

Just took another look. The exception is not expected. Pasting the stack trace.
{code:java}
java.util.concurrent.TimeoutException
	at org.apache.cassandra.net.AsyncPromise.get(AsyncPromise.java:258)
	at org.apache.cassandra.net.FutureDelegate.get(FutureDelegate.java:143)
	at org.apache.cassandra.net.ConnectionTest.doTestManual(ConnectionTest.java:268)
	at org.apache.cassandra.net.ConnectionTest.testManual(ConnectionTest.java:236)
	at org.apache.cassandra.net.ConnectionTest.testMessagePurging(ConnectionTest.java:679)
{code}

In the test, testMessagePurging, it already closed the inbound connection. The test does not throw at that line, so I would assume that inbound is closed successfully. 

If so, we should not see the Timeout exception from {{doTestManual(ConnectionTest.java:268)}}. Because the inbound is closed already. 

I suspect that there might be some hidden issue in the {{close()}} method. I will open a new ticket if it is. 

> 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
>            Assignee: Yifan Cai
>            Priority: Normal
>              Labels: pull-request-available
>             Fix For: 4.0, 4.0-beta1
>
>         Attachments: CASS-15338-Docker.zip
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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