Fix Typo in Snapshot Abort Test () ()

Forgot the brackets here in  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

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