aboutsummaryrefslogtreecommitdiffstats
path: root/container-disc/src/test/java/com/yahoo/container/jdisc/component/DeconstructorTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-disc/src/test/java/com/yahoo/container/jdisc/component/DeconstructorTest.java')
-rw-r--r--container-disc/src/test/java/com/yahoo/container/jdisc/component/DeconstructorTest.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/container-disc/src/test/java/com/yahoo/container/jdisc/component/DeconstructorTest.java b/container-disc/src/test/java/com/yahoo/container/jdisc/component/DeconstructorTest.java
index dfc1d32938f..a566a13f6b0 100644
--- a/container-disc/src/test/java/com/yahoo/container/jdisc/component/DeconstructorTest.java
+++ b/container-disc/src/test/java/com/yahoo/container/jdisc/component/DeconstructorTest.java
@@ -11,6 +11,8 @@ import org.junit.Test;
import java.util.List;
import java.util.concurrent.TimeUnit;
+import java.time.Duration;
+import java.time.Instant;
import static java.util.Collections.emptyList;
import static java.util.Collections.singleton;
@@ -24,7 +26,7 @@ public class DeconstructorTest {
@Before
public void init() {
- deconstructor = new Deconstructor(Deconstructor.Mode.SHUTDOWN);
+ deconstructor = new Deconstructor(Deconstructor.Mode.RECONFIG, Duration.ZERO);
}
@Test
@@ -49,6 +51,7 @@ public class DeconstructorTest {
@Test
public void deconstruct_is_synchronous_in_shutdown_mode() {
+ deconstructor = new Deconstructor(Deconstructor.Mode.SHUTDOWN);
var slowDeconstructComponent = new SlowDeconstructComponent();
deconstructor.deconstruct(List.of(slowDeconstructComponent), emptyList());
assertTrue(slowDeconstructComponent.destructed);