Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ protected void doRun() {
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/68772")
public void testListenersNotifiedOnCorrectThreads() throws InterruptedException {

final int adderThreads = between(1, 5);
Expand All @@ -90,7 +89,10 @@ public void testListenersNotifiedOnCorrectThreads() throws InterruptedException
awaitSafe(barrier);

final AtomicBoolean isComplete = new AtomicBoolean();
if (postComplete.get()) {
if (completerThreads == 1 && postComplete.get()) {
// If there are multiple completer threads then onResponse might return on one thread, and hence postComplete is
// set, before the other completer thread notifies all the listeners. OTOH with one completer thread we know that
// postComplete indicates that the listeners were already notified.
future.addListener(new ActionListener<>() {
@Override
public void onResponse(Void response) {
Expand Down