[Jboss-cvs] JBossAS SVN: r56924 - branches/Branch_4_0/testsuite/src/main/org/jboss/test/testbeancluster/test
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Sep 17 22:50:23 EDT 2006
Author: bstansberry at jboss.com
Date: 2006-09-17 22:50:22 -0400 (Sun, 17 Sep 2006)
New Revision: 56924
Modified:
branches/Branch_4_0/testsuite/src/main/org/jboss/test/testbeancluster/test/BeanUnitTestCase.java
Log:
Remove unreliable max call time test; don't reinvoke on a bean once it's been timed out and removed
Modified: branches/Branch_4_0/testsuite/src/main/org/jboss/test/testbeancluster/test/BeanUnitTestCase.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/testbeancluster/test/BeanUnitTestCase.java 2006-09-18 02:38:44 UTC (rev 56923)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/testbeancluster/test/BeanUnitTestCase.java 2006-09-18 02:50:22 UTC (rev 56924)
@@ -332,6 +332,8 @@
{
int id = n % beans.length;
StatefulSession bean = beans[id];
+ if (bean == null)
+ continue; // bean timed out and removed
String name = "testStatefulPassiviationExpiration#"+id;
long callStart = System.currentTimeMillis();
long inactive = callStart - accessStamp[id];
@@ -351,6 +353,8 @@
catch (java.rmi.NoSuchObjectException nso)
{
log.debug(n+" Caught NoSuchObjectException on bean " + id + " -- inactive time = " + inactive);
+ // Remove the bean as it will never succeed again
+ beans[id] = null;
}
}
log.info(N+" calls complete, max="+max+", min="+min+", maxInactive="+maxInactive);
@@ -368,6 +372,8 @@
{
int id = n % beans.length;
StatefulSession bean = beans[id];
+ if (bean == null)
+ continue; // bean timed out and removed
String name = "testStatefulPassiviationExpiration#"+id;
long callStart = System.currentTimeMillis();
long inactive = callStart - accessStamp[id];
@@ -387,16 +393,20 @@
catch (java.rmi.NoSuchObjectException nso)
{
log.debug(n+" Caught NoSuchObjectException on bean " + id + " -- inactive time = " + (callStart - accessStamp[id]));
+ // Remove the bean as it will never succeed again
+ beans[id] = null;
}
}
log.info(N+" calls complete, max="+max+", min="+min+", maxInactive="+maxInactive);
- assertTrue("max < 3000", max < 3000 );
+ // BES -- max call time check removed, as it can randomly fail if there is a long GC pause
+ // assertTrue("max < 3000", max < 3000 );
for(int n = 0; n < beans.length; n ++)
{
try
{
- beans[n].remove();
+ if (beans[n] != null)
+ beans[n].remove();
}
catch (java.rmi.NoSuchObjectException nso)
{
More information about the jboss-cvs-commits
mailing list