Skip to content

Conversation

@DaveCTurner
Copy link
Contributor

This test assumed, incorrectly, that future#done() completes before
future#set() returns, but this isn't true if there are multiple
threads racing to complete the future. In other words listeners added
before calling onResponse() are not necessarily notified by the time
onResponse() returns. This commit fixes the test to account for this
subtle point.

Closes #68772

This test assumed, incorrectly, that `future#done()` completes before
`future#set()` returns, but this isn't true if there are multiple
threads racing to complete the future. In other words listeners added
before calling `onResponse()` are not necessarily notified by the time
`onResponse()` returns. This commit fixes the test to account for this
subtle point.

Closes elastic#68772
@DaveCTurner DaveCTurner added >test Issues or PRs that are addressing/adding tests :Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. v8.0.0 v7.12.0 labels Feb 10, 2021
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Feb 10, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

Copy link
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@DaveCTurner DaveCTurner merged commit 1e29fb3 into elastic:master Feb 10, 2021
@DaveCTurner DaveCTurner deleted the 2021-02-10-fix-testListenersNotifiedOnCorrectThreads branch February 10, 2021 09:47
DaveCTurner added a commit that referenced this pull request Feb 10, 2021
This test assumed, incorrectly, that `future#done()` completes before
`future#set()` returns, but this isn't true if there are multiple
threads racing to complete the future. In other words listeners added
before calling `onResponse()` are not necessarily notified by the time
`onResponse()` returns. This commit fixes the test to account for this
subtle point.

Closes #68772
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Indexing/Distributed A catch all label for anything in the Distributed Indexing Area. Please avoid if you can. Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. >test Issues or PRs that are addressing/adding tests v7.12.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] ListenableActionFutureTests.testListenersNotifiedOnCorrectThreads failed

4 participants