summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/src/test/java/libcore/dalvik/system/CloseGuardTester.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/support/src/test/java/libcore/dalvik/system/CloseGuardTester.java b/support/src/test/java/libcore/dalvik/system/CloseGuardTester.java
index 4ed59a2..e82d33d 100644
--- a/support/src/test/java/libcore/dalvik/system/CloseGuardTester.java
+++ b/support/src/test/java/libcore/dalvik/system/CloseGuardTester.java
@@ -26,6 +26,7 @@ import java.util.logging.Handler;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
import junit.framework.Assert;
+import libcore.java.lang.ref.FinalizationTester;
public final class CloseGuardTester implements Closeable {
@@ -45,14 +46,12 @@ public final class CloseGuardTester implements Closeable {
* Collect immediately before we start monitoring the CloseGuard logs.
* This lowers the chance that we'll report an unrelated leak.
*/
- System.gc();
- System.runFinalization();
+ FinalizationTester.induceFinalization();
logger.addHandler(logWatcher);
}
public void assertEverythingWasClosed() {
- System.gc();
- System.runFinalization();
+ FinalizationTester.induceFinalization();
if (!logRecords.isEmpty()) {
// print the log records with the output of this test