[
https://issues.apache.org/jira/browse/CASSANDRA-15308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17026338#comment-17026338
]
Yifan Cai commented on CASSANDRA-15308:
---------------------------------------
The unreleased capacity at the end of each round is the cause of "there is some
still allocated at the beginning of the next one."
In the previous version of the test, this round *just ended* after asserting
the {{outbound.pendingBytes()}} equals to the amount of acquired capacity. The
pending bytes (i.e. still acquired capacity) were not released. Another
potential issue is that if the assertion failed, the pending bytes are not
going to be released as well. That is why the releasing is in the {{finally}}
block.
{quote}A reasonable expectation of these tests is that they naturally release
any allocated capacity before they complete.
{quote}
I agree. The previous test did not do that (i.e. not releasing the capacity
before the round complete). The patch changed the test to have the behavior as
you described.
> Fix flakey testAcquireReleaseOutbound -
> org.apache.cassandra.net.ConnectionTest
> -------------------------------------------------------------------------------
>
> Key: CASSANDRA-15308
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15308
> Project: Cassandra
> Issue Type: Bug
> Components: Test/unit
> Reporter: Joey Lynch
> Assignee: Yifan Cai
> Priority: Normal
> Fix For: 4.0-alpha
>
>
> Example failure:
> https://circleci.com/gh/jolynch/cassandra/554#tests/containers/61
> {noformat}
> Your job ran 4428 tests with 1 failure
> - testAcquireReleaseOutbound - org.apache.cassandra.net.ConnectionTest
> junit.framework.AssertionFailedError
> at
> org.apache.cassandra.net.ConnectionTest.lambda$testAcquireReleaseOutbound$53(ConnectionTest.java:770)
> at
> org.apache.cassandra.net.ConnectionTest.lambda$doTest$8(ConnectionTest.java:238)
> at
> org.apache.cassandra.net.ConnectionTest.doTestManual(ConnectionTest.java:258)
> at
> org.apache.cassandra.net.ConnectionTest.doTest(ConnectionTest.java:236)
> at org.apache.cassandra.net.ConnectionTest.test(ConnectionTest.java:225)
> at
> org.apache.cassandra.net.ConnectionTest.testAcquireReleaseOutbound(ConnectionTest.java:767)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]