poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1766397 - in /poi/trunk: build.xml src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetMergeRegions.java
Date Mon, 24 Oct 2016 12:07:15 GMT
Author: centic
Date: Mon Oct 24 12:07:15 2016
New Revision: 1766397

URL: http://svn.apache.org/viewvc?rev=1766397&view=rev
Log:
Allow more time for a unit-test when running on slow Gump VM

Modified:
    poi/trunk/build.xml
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetMergeRegions.java

Modified: poi/trunk/build.xml
URL: http://svn.apache.org/viewvc/poi/trunk/build.xml?rev=1766397&r1=1766396&r2=1766397&view=diff
==============================================================================
--- poi/trunk/build.xml (original)
+++ poi/trunk/build.xml Mon Oct 24 12:07:15 2016
@@ -300,6 +300,7 @@ under the License.
         <propertyref name="javax.xml.stream.XMLInputFactory"/>
     	<propertyref name="org.apache.commons.logging.Log"/>
         <propertyref name="java.locale.providers"/>		<!-- required for Java 9 compilation
-->
+        <propertyref name="version.id"/>    <!-- to detect if we are running on
slow Gump VM -->
     </propertyset>
 
     <!-- this can be overwriten to empty when running with Java 9 -->

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetMergeRegions.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetMergeRegions.java?rev=1766397&r1=1766396&r2=1766397&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetMergeRegions.java
(original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetMergeRegions.java
Mon Oct 24 12:07:15 2016
@@ -41,9 +41,17 @@ public class TestXSSFSheetMergeRegions {
                 }
                 System.out.println("Retry " + i + " because run-time is too high: " + millis);
             }
-            
+
+            boolean inGump = false;
+            String version = System.getProperty("version.id");
+            if(version != null && version.startsWith("gump-")) {
+                inGump = true;
+            }
+
             // This time is typically ~800ms, versus ~7800ms to iterate getMergedRegion(int).
-            assertTrue("Should have taken <2000 ms to iterate 50k merged regions but took
" + millis, millis < 2000);
+            // when running in Gump, the VM is very slow, so we should allow much more time
+            assertTrue("Should have taken <2000 ms to iterate 50k merged regions but took
" + millis,
+                    inGump ? millis < 8000 : millis < 2000);
         } finally {
             wb.close();
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message