diff options
author | gjoranv <gv@verizonmedia.com> | 2020-12-15 14:13:18 +0100 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2020-12-15 15:33:34 +0100 |
commit | 1df01cb01cb5fd95f947b8a84763662411a05b4b (patch) | |
tree | c1edacbbf74775d498ccd2a8ebb5a08dde114afd /container-disc/src/test | |
parent | 81d4a76511c3dfc19aed98b47153dcea95fd31fd (diff) |
Switch test to use RECONFIG mode by default.
- Use SHUTDOWN mode for the latest test that uses a component
with the delayed deconstruct method.
- Remove the now unnecessary explanation from the class comment.
Diffstat (limited to 'container-disc/src/test')
-rw-r--r-- | container-disc/src/test/java/com/yahoo/container/jdisc/component/DeconstructorTest.java | 5 |
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); |