Skip to content

Commit 97d7de3

Browse files
committed
Add comment on why gc needs to run.
1 parent 708b68f commit 97d7de3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

integ-testing/src/main/java/com/google/firebase/testing/integ/StrictModeRule.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public void evaluate() throws Throwable {
129129
} finally {
130130
InstrumentationRegistry.getInstrumentation()
131131
.runOnMainSync(() -> StrictMode.setThreadPolicy(originalThreadPolicy.get()));
132+
// Make sure GC happens, so that the VM policy can detect unclosed resources.
132133
runGc();
133134
StrictMode.setVmPolicy(originalVmPolicy);
134135
}

0 commit comments

Comments
 (0)