[jboss-cvs] JBossAS SVN: r62058 - branches/Branch_4_2/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:40:40 EDT 2007


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

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



Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jbossmx/compliance/timer/PeriodTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jbossmx/compliance/timer/PeriodTestCase.java	2007-04-03 22:22:45 UTC (rev 62057)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jbossmx/compliance/timer/PeriodTestCase.java	2007-04-03 22:40:40 UTC (rev 62058)
@@ -192,7 +192,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 + "%");
@@ -241,4 +242,4 @@
      catch (Exception ignored) {}
    }   
       
-}
\ No newline at end of file
+}




More information about the jboss-cvs-commits mailing list