commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r1006099 - /commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileCleaningTrackerTestCase.java
Date Sat, 09 Oct 2010 01:55:02 GMT
Author: niallp
Date: Sat Oct  9 01:55:02 2010
New Revision: 1006099

URL: http://svn.apache.org/viewvc?rev=1006099&view=rev
Log:
IO-161 Try garbage collecting before trying to fill memory

Modified:
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileCleaningTrackerTestCase.java

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileCleaningTrackerTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileCleaningTrackerTestCase.java?rev=1006099&r1=1006098&r2=1006099&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileCleaningTrackerTestCase.java
(original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileCleaningTrackerTestCase.java
Sat Oct  9 01:55:02 2010
@@ -302,6 +302,8 @@ public class FileCleaningTrackerTestCase
     }
 
     private void waitUntilTrackCount() throws Exception {
+        System.gc(); 
+        Thread.sleep(500);
         int count = 0;
         while(theInstance.getTrackCount() != 0 && count++ < 5) {
             List<String> list = new ArrayList<String>();
@@ -312,7 +314,6 @@ public class FileCleaningTrackerTestCase
                 }
             } catch (Throwable ignored) {
             }
-            list.clear();
             list = null;
             System.gc(); 
             Thread.sleep(1000);



Mime
View raw message