[CI] NettyClientTest.testServerDisconnection is flaky
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
Research direction
Start with NettyClientTest.testServerDisconnection and the existing CommonTestUtils.retry helper. Update the test to wait for the connection map to become empty before preserving its AssertJ assertion, without changing production connection behavior. Done means the test no longer races asynchronous connection cleanup.
Written by the indexing model from the issue text.
Description
Search before asking
- I searched in the issues and found nothing similar.
Fluss version
main (development)
Please describe the bug 🐞
NettyClientTest.testServerDisconnection can fail intermittently with:
expected: 0
but was: 1
The test waits for the failed request future and then immediately asserts that NettyClient.connections() is empty.
In ServerConnection.close(), pending request futures are completed before closeFuture. The connection-removal callback is attached to closeFuture, so the request future can complete before the disconnected connection is removed from the map.
This makes the assertion race with asynchronous connection cleanup. The production behavior is unaffected; the test should wait for the observable cleanup to finish.
Solution
Use the existing CommonTestUtils.retry helper to wait until the connection map becomes empty, while preserving the existing AssertJ assertion and leaving production connection behavior unchanged.
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Dominant language
- Java
- Stars
- 2.2k
- Forks
- 628
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 138
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/fluss
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100