Fix Typo in Snapshot Abort Test (#58238) (#58247)

Forgot the brackets here in #58214 so in the rare case where the
first update seen by the listener doesn't match it will still remove
itself and never be invoked again -> timeout.
This commit is contained in:
Armin Braun 2020-06-17 14:53:39 +02:00 committed by GitHub
parent ab2c6d9696
commit 41af7f5455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -1388,9 +1388,10 @@ public class DedicatedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTest
public void clusterChanged(ClusterChangedEvent event) {
final SnapshotsInProgress snapshotsInProgress = event.state().custom(SnapshotsInProgress.TYPE);
if (snapshotsInProgress != null && snapshotsInProgress.entries().stream()
.anyMatch(entry -> entry.state() == SnapshotsInProgress.State.ABORTED))
abortVisibleFuture.onResponse(null);
clusterService.removeListener(this);
.anyMatch(entry -> entry.state() == SnapshotsInProgress.State.ABORTED)) {
abortVisibleFuture.onResponse(null);
clusterService.removeListener(this);
}
}
});