Arrive instead, when stopping for suspension
@@ -93,16 +93,13 @@ public class ContainerTester implements AutoCloseable {
storageMaintainer, flagSource,
Collections.emptyList(), Optional.empty(), Optional.empty(), clock, Duration.ofSeconds(-1),
VespaServiceDumper.DUMMY_INSTANCE) {
- AtomicBoolean stopped = new AtomicBoolean();
@Override public void converge(NodeAgentContext context) {
super.converge(context);
phaser.arriveAndAwaitAdvance();
}
@Override public void stopForHostSuspension(NodeAgentContext context) {
- if (stopped.compareAndSet(false, true)) {
super.stopForHostSuspension(context);
- phaser.arriveAndDeregister();
- }
+ phaser.arriveAndAwaitAdvance();
}
};
nodeAdmin = new NodeAdminImpl(nodeAgentFactory, metrics, clock, Duration.ofMillis(10), Duration.ZERO);
