< prev index next >

test/java/lang/ref/CleanerTest.java

Print this page
rev 17326 : imported patch 8181759-2


  34 import java.util.function.Consumer;
  35 import java.util.function.Supplier;
  36 
  37 import jdk.internal.ref.PhantomCleanable;
  38 import jdk.internal.ref.WeakCleanable;
  39 import jdk.internal.ref.SoftCleanable;
  40 import jdk.internal.ref.CleanerFactory;
  41 
  42 import sun.hotspot.WhiteBox;
  43 
  44 import jdk.test.lib.Utils;
  45 
  46 import org.testng.Assert;
  47 import org.testng.TestNG;
  48 import org.testng.annotations.Test;
  49 
  50 /*
  51  * @test
  52  * @library /lib/testlibrary /test/lib
  53  * @build sun.hotspot.WhiteBox
  54  * @build jdk.test.lib.Utils





  55  * @modules java.base/jdk.internal
  56  *          java.base/jdk.internal.misc
  57  *          java.base/jdk.internal.ref
  58  *          java.management
  59  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  60  * @run testng/othervm
  61  *      -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  62  *      -verbose:gc CleanerTest
  63  */
  64 
  65 @Test
  66 public class CleanerTest {
  67     // A common CleaningService used by the test for notifications
  68     static final Cleaner COMMON = CleanerFactory.cleaner();
  69 
  70     // Access to WhiteBox utilities
  71     static final WhiteBox whitebox = WhiteBox.getWhiteBox();
  72 
  73     /**
  74      * Test that sequences of the various actions on a Reference




  34 import java.util.function.Consumer;
  35 import java.util.function.Supplier;
  36 
  37 import jdk.internal.ref.PhantomCleanable;
  38 import jdk.internal.ref.WeakCleanable;
  39 import jdk.internal.ref.SoftCleanable;
  40 import jdk.internal.ref.CleanerFactory;
  41 
  42 import sun.hotspot.WhiteBox;
  43 
  44 import jdk.test.lib.Utils;
  45 
  46 import org.testng.Assert;
  47 import org.testng.TestNG;
  48 import org.testng.annotations.Test;
  49 
  50 /*
  51  * @test
  52  * @library /lib/testlibrary /test/lib
  53  * @build sun.hotspot.WhiteBox
  54  *        jdk.test.lib.Utils
  55  *        jdk.test.lib.Asserts
  56  *        jdk.test.lib.JDKToolFinder
  57  *        jdk.test.lib.JDKToolLauncher
  58  *        jdk.test.lib.Platform
  59  *        jdk.test.lib.process.*
  60  * @modules java.base/jdk.internal
  61  *          java.base/jdk.internal.misc
  62  *          java.base/jdk.internal.ref
  63  *          java.management
  64  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  65  * @run testng/othervm
  66  *      -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
  67  *      -verbose:gc CleanerTest
  68  */
  69 
  70 @Test
  71 public class CleanerTest {
  72     // A common CleaningService used by the test for notifications
  73     static final Cleaner COMMON = CleanerFactory.cleaner();
  74 
  75     // Access to WhiteBox utilities
  76     static final WhiteBox whitebox = WhiteBox.getWhiteBox();
  77 
  78     /**
  79      * Test that sequences of the various actions on a Reference


< prev index next >