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,10 +1388,11 @@ 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);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
final AtomicBoolean blocked = new AtomicBoolean(true);
|
final AtomicBoolean blocked = new AtomicBoolean(true);
|
||||||
|
|
Loading…
Reference in New Issue