Package com.google.common.testing.GcFinalization

Examples of com.google.common.testing.GcFinalization.FinalizationPredicate


  }

  public void testAwaitDone_FinalizationPredicate() {
    final WeakHashMap<Object, Object> map = new WeakHashMap<Object, Object>();
    map.put(new Object(), Boolean.TRUE);
    GcFinalization.awaitDone(new FinalizationPredicate() {
      public boolean isDone() {
        return map.isEmpty();
      }
    });
    assertTrue(map.isEmpty());
View Full Code Here


  public void testAwaitDone_FinalizationPredicate_Interrupted() {
    Interruptenator interruptenator = new Interruptenator(Thread.currentThread());
    try {
      try {
        GcFinalization.awaitDone(new FinalizationPredicate() {
            public boolean isDone() {
              return false;
            }
          });
        fail("should throw");
View Full Code Here

  }

  public void testAwaitDone_FinalizationPredicate() {
    final WeakHashMap<Object, Object> map = new WeakHashMap<Object, Object>();
    map.put(new Object(), Boolean.TRUE);
    GcFinalization.awaitDone(new FinalizationPredicate() {
      public boolean isDone() {
        return map.isEmpty();
      }
    });
    assertTrue(map.isEmpty());
View Full Code Here

  public void testAwaitDone_FinalizationPredicate_Interrupted() {
    Interruptenator interruptenator = new Interruptenator(Thread.currentThread());
    try {
      try {
        GcFinalization.awaitDone(new FinalizationPredicate() {
            public boolean isDone() {
              return false;
            }
          });
        fail("should throw");
View Full Code Here

TOP

Related Classes of com.google.common.testing.GcFinalization.FinalizationPredicate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.