@SuppressFBWarnings("DM_GC") // Used to trigger strictmode detecting leaked closeables
 @Override
 protected void tearDown() throws Exception {
   try {
     NativeTestServer.shutdownNativeTestServer();
     mTestFramework.mCronetEngine.shutdown();
     assertTrue(mFile.delete());
     // Run GC and finalizers a few times to pick up leaked closeables
     for (int i = 0; i < 10; i++) {
       System.gc();
       System.runFinalization();
     }
     System.gc();
     System.runFinalization();
     super.tearDown();
   } finally {
     StrictMode.setVmPolicy(mOldVmPolicy);
   }
 }
Esempio n. 2
0
 @Override
 protected void tearDown() throws Exception {
   NativeTestServer.shutdownNativeTestServer();
   mTestFramework.mCronetEngine.shutdown();
   super.tearDown();
 }