Author: ozizka(a)redhat.com
Date: 2009-04-23 15:46:16 -0400 (Thu, 23 Apr 2009)
New Revision: 326
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JBossASNodeTest.java
Log:
JBoss AS node test fixed
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JBossASNodeTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JBossASNodeTest.java 2009-04-23
18:52:45 UTC (rev 325)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/JBossASNodeTest.java 2009-04-23
19:46:16 UTC (rev 326)
@@ -114,9 +114,9 @@
log.info( headerText +" 1st: "+ metricsProps.toString() );
// Active Thread Count
- int threads1 = NumberUtils.toInt(metricsProps.getProperty("Active Thread
Count").replace(',', '.'));
- double memFree1 = NumberUtils.toDouble(metricsProps.getProperty("JVM Free
Memory").replace(',', '.'));
- double memTotal1 = NumberUtils.toDouble(metricsProps.getProperty("JVM Total
Memory").replace(',', '.'));
+ int threads1 = (int)NumberUtils.toDouble(metricsProps.getProperty("Active Thread
Count").replace(',', '.'));
+ double memFree1 = NumberUtils.toDouble(metricsProps.getProperty("JVM Free
Memory").replace(',', '.').replace("MB", ""));
+ double memTotal1 = NumberUtils.toDouble(metricsProps.getProperty("JVM Total
Memory").replace(',', '.').replace("MB", ""));
// Do some requests to add threads.
@@ -147,9 +147,11 @@
log.info( headerText +" 2nd: "+ metricsProps.toString() );
// Active Thread Count
- int threads2 = NumberUtils.toInt( metricsProps.getProperty("Active Thread
Count").replace(',', '.') );
- double memFree2 = NumberUtils.toDouble(metricsProps.getProperty("JVM Free
Memory").replace(',', '.') );
- double memTotal2 = NumberUtils.toDouble(metricsProps.getProperty("JVM Total
Memory").replace(',', '.') );
+ int threads2 = (int)NumberUtils.toDouble( metricsProps.getProperty("Active Thread
Count").replace(',', '.') );
+ //log.info( "DEBUG - memFree2: "+ metricsProps.getProperty("JVM Free
Memory").replace(',', '.') );///
+ double memFree2 = NumberUtils.toDouble(metricsProps.getProperty("JVM Free
Memory").replace(',', '.').replace("MB", "") );
+ //log.info( "DEBUG - memFree2: "+ metricsProps.getProperty("JVM Total
Memory").replace(',', '.') );///
+ double memTotal2 = NumberUtils.toDouble(metricsProps.getProperty("JVM Total
Memory").replace(',', '.').replace("MB", "") );
log.info( "Value | old | new ");
log.info( String.format("Threads: %d, %d", threads1, threads2) );
Show replies by date