diff --git a/assembly/src/test/java/org/apache/activemq/benchmark/BenchmarkSupport.java b/assembly/src/test/java/org/apache/activemq/benchmark/BenchmarkSupport.java index fae1842911..d32c43f593 100755 --- a/assembly/src/test/java/org/apache/activemq/benchmark/BenchmarkSupport.java +++ b/assembly/src/test/java/org/apache/activemq/benchmark/BenchmarkSupport.java @@ -184,7 +184,7 @@ public class BenchmarkSupport { times++; } if (times > 0) { - average = total / times; + average = total / (double) times; } long oldtime = time; diff --git a/assembly/src/test/java/org/apache/activemq/benchmark/Producer.java b/assembly/src/test/java/org/apache/activemq/benchmark/Producer.java index 1a4e5ee18c..02f8f3f48c 100755 --- a/assembly/src/test/java/org/apache/activemq/benchmark/Producer.java +++ b/assembly/src/test/java/org/apache/activemq/benchmark/Producer.java @@ -178,6 +178,7 @@ public class Producer extends BenchmarkSupport { buffer.append(line); buffer.append(File.separator); } + in.close(); return buffer.toString(); } }