You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by co...@apache.org on 2014/01/27 14:57:32 UTC
svn commit: r1561679 -
/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java
Author: coheigea
Date: Mon Jan 27 13:57:31 2014
New Revision: 1561679
URL: http://svn.apache.org/r1561679
Log:
Fixing a problem if a test runs so quickly, no memory samples are taken
Modified:
santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java
Modified: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java?rev=1561679&r1=1561678&r2=1561679&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java Mon Jan 27 13:57:31 2014
@@ -260,7 +260,11 @@ public class PerformanceMemoryTest exten
maxMem = mem > maxMem ? mem : maxMem;
}
System.out.println("Max memory usage: " + maxMem + "MB");
- return maxMem;
+
+ if (maxMem > Integer.MIN_VALUE) {
+ return maxMem;
+ }
+ return 0;
}
}
}