[jboss-cvs] JBossAS SVN: r72501 - trunk/testsuite/src/main/org/jboss/test/cluster/web.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Apr 21 12:59:07 EDT 2008


Author: bstansberry at jboss.com
Date: 2008-04-21 12:59:07 -0400 (Mon, 21 Apr 2008)
New Revision: 72501

Modified:
   trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelper.java
Log:
Try to flush out weak refs to previous run classes by running System.gc() before pojo cache tests

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelper.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelper.java	2008-04-21 16:41:36 UTC (rev 72500)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/web/CacheHelper.java	2008-04-21 16:59:07 UTC (rev 72501)
@@ -223,12 +223,17 @@
    public void startService() throws Exception
    {
       super.startService();
+      
       cacheConfigName = System.getProperty(CACHE_CONFIG_PROP);
       String pojo = System.getProperty(CACHE_TYPE_PROP, "false");
       usePojoCache = Boolean.parseBoolean(pojo);
       
       getLog().debug("cacheConfigName=" + cacheConfigName + 
                      " and usePojoCache=" + usePojoCache);
+      
+      // Force a gc to try to clear weak refs that screw up pojocache tests
+      if (usePojoCache)
+         System.gc();
    }
    
    public void stopService() throws Exception




More information about the jboss-cvs-commits mailing list