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:
parent
ab2c6d9696
commit
41af7f5455
|
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue