diff options
Diffstat (limited to 'jdisc_core/src/test/java/com/yahoo/jdisc/core/ActiveContainerDeactivationWatchdogTest.java')
-rw-r--r-- | jdisc_core/src/test/java/com/yahoo/jdisc/core/ActiveContainerDeactivationWatchdogTest.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/core/ActiveContainerDeactivationWatchdogTest.java b/jdisc_core/src/test/java/com/yahoo/jdisc/core/ActiveContainerDeactivationWatchdogTest.java index 05207728c88..a618b82c5ec 100644 --- a/jdisc_core/src/test/java/com/yahoo/jdisc/core/ActiveContainerDeactivationWatchdogTest.java +++ b/jdisc_core/src/test/java/com/yahoo/jdisc/core/ActiveContainerDeactivationWatchdogTest.java @@ -6,7 +6,6 @@ import com.yahoo.jdisc.ResourceReference; import com.yahoo.jdisc.statistics.ActiveContainerMetrics; import com.yahoo.jdisc.test.TestDriver; import com.yahoo.test.ManualClock; -import org.junit.Ignore; import org.junit.Test; import java.lang.ref.WeakReference; @@ -69,7 +68,6 @@ public class ActiveContainerDeactivationWatchdogTest { } @Test - @Ignore("JVM does not give any guarantee when phantom references will be enqueued to reference queues") public void deactivated_container_destructed_if_its_reference_counter_is_nonzero() { ExecutorMock executor = new ExecutorMock(); ActiveContainerDeactivationWatchdog watchdog = @@ -87,6 +85,7 @@ public class ActiveContainerDeactivationWatchdogTest { WeakReference<ActiveContainer> containerWeakReference = new WeakReference<>(container); container = null; // make container instance collectable by GC System.gc(); + System.runFinalization(); // this is required to trigger enqueuing of phantom references on some Linux systems assertNull("Container is not GCed - probably because the watchdog has a concrete reference to it", containerWeakReference.get()); |