Class GarbageCollectors

java.lang.Object
brave.test.util.GarbageCollectors

public final class GarbageCollectors
extends Object
Utilities for working with the garbage collector in tests.
  • Method Details

    • blockOnGC

      public static void blockOnGC()
      Runs the garbage collector and waits until all of the provided WeakReference are cleared, indicating the referenced objects have been collected.