You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ve...@apache.org on 2010/05/28 21:10:49 UTC

svn commit: r949264 - /webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/builder/StAXOMBuilderTest.java

Author: veithen
Date: Fri May 28 19:10:49 2010
New Revision: 949264

URL: http://svn.apache.org/viewvc?rev=949264&view=rev
Log:
WSCOMMONS-546: Fixed the StAXOMBuilderTest so that it works with XLXP (IBM JRE 1.6).

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/builder/StAXOMBuilderTest.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/builder/StAXOMBuilderTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/builder/StAXOMBuilderTest.java?rev=949264&r1=949263&r2=949264&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/builder/StAXOMBuilderTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/builder/StAXOMBuilderTest.java Fri May 28 19:10:49 2010
@@ -176,9 +176,12 @@ public class StAXOMBuilderTest extends A
      * @throws Exception
      */
     public void testIOExceptionInGetText() throws Exception {
-        // Construct a stream that will throw an exception in the middle of a text node
+        // Construct a stream that will throw an exception in the middle of a text node.
+        // We need to create a very large document, because some parsers (such as some
+        // versions of XLXP) have a large input buffer and would throw an exception already
+        // when the XMLStreamReader is created.
         StringBuffer xml = new StringBuffer("<root>");
-        for (int i=0; i<10000; i++) {
+        for (int i=0; i<100000; i++) {
             xml.append('x');
         }
         InputStream in = new ExceptionInputStream(new ByteArrayInputStream(xml.toString().getBytes("ASCII")));