[jboss-cvs] JBossAS SVN: r62060 - branches/Branch_4_0/testsuite/src/main/org/jboss/test/jbossmx/compliance/timer.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Apr 3 18:46:11 EDT 2007


Author: vivekl at redhat.com
Date: 2007-04-03 18:46:11 -0400 (Tue, 03 Apr 2007)
New Revision: 62060

Modified:
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/jbossmx/compliance/timer/PeriodTestCase.java
Log:
- Resolve: JBAS-4291 (PeriodTestCase - wrong computation of maxDeviation)



Modified: branches/Branch_4_0/testsuite/src/main/org/jboss/test/jbossmx/compliance/timer/PeriodTestCase.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/jbossmx/compliance/timer/PeriodTestCase.java	2007-04-03 22:41:35 UTC (rev 62059)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/jbossmx/compliance/timer/PeriodTestCase.java	2007-04-03 22:46:11 UTC (rev 62060)
@@ -182,7 +182,8 @@
       log.debug("Actual difference: " + actualDiff + "%, allowed: +/-" + percentage + "%");
 
       long diff = Math.abs(expected - actual);
-      long maxDeviation = expected / percentage;
+      // percentage converted to milliseconds
+      long maxDeviation = expected * percentage/100;
       
       if (diff > maxDeviation)
          fail("Time difference larger than " + percentage + "%");
@@ -231,4 +232,4 @@
      catch (Exception ignored) {}
    }   
       
-}
\ No newline at end of file
+}




More information about the jboss-cvs-commits mailing list