You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2012/07/26 22:52:41 UTC
svn commit: r1366197 - in /webservices/axiom/branches/AXIOM-435/modules:
axiom-dom-testsuite/ axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/
axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/
axiom-parent/ axiom-testutils/
Author: veithen
Date: Thu Jul 26 20:52:41 2012
New Revision: 1366197
URL: http://svn.apache.org/viewvc?rev=1366197&view=rev
Log:
Resolved remaining test failures.
Modified:
webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/pom.xml
webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java
webservices/axiom/branches/AXIOM-435/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderSAXParserTest.java
webservices/axiom/branches/AXIOM-435/modules/axiom-parent/pom.xml
webservices/axiom/branches/AXIOM-435/modules/axiom-testutils/pom.xml
Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/pom.xml?rev=1366197&r1=1366196&r2=1366197&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/pom.xml (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-dom-testsuite/pom.xml Thu Jul 26 20:52:41 2012
@@ -51,7 +51,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
- <version>2.9.1</version>
</dependency>
<dependency>
<groupId>xalan</groupId>
Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java?rev=1366197&r1=1366196&r2=1366197&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java Thu Jul 26 20:52:41 2012
@@ -23,6 +23,7 @@ import junit.framework.TestSuite;
import org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory;
import org.apache.axiom.ts.om.OMTestSuiteBuilder;
+import org.apache.axiom.ts.om.builder.TestCreateOMBuilderFromDOMSource;
import org.apache.axiom.ts.om.container.TestSerialize;
import org.apache.axiom.ts.om.document.TestClone;
import org.apache.axiom.ts.om.document.TestDigest;
@@ -43,6 +44,7 @@ public class OMImplementationTest extend
// TODO: this case is not working because Axiom generates an XML declaration
// but uses another charset encoding to serialize the document
builder.exclude(TestSerialize.class, "(&(file=iso-8859-1.xml)(container=document))");
+ builder.exclude(TestCreateOMBuilderFromDOMSource.class, "(file=iso-8859-1.xml)");
builder.exclude(TestClone.class, "(file=iso-8859-1.xml)");
// TODO: if there is a comment node surrounded by text, then these text nodes need to be merged
Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderSAXParserTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderSAXParserTest.java?rev=1366197&r1=1366196&r2=1366197&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderSAXParserTest.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-integration/src/test/java/org/apache/axiom/om/impl/builder/SAXOMBuilderSAXParserTest.java Thu Jul 26 20:52:41 2012
@@ -28,6 +28,7 @@ import javax.xml.parsers.SAXParserFactor
import junit.framework.TestSuite;
import org.apache.axiom.om.AbstractTestCase;
+import org.apache.axiom.testutils.XMLAssertEx;
import org.apache.axiom.testutils.conformance.ConformanceTestFile;
import org.custommonkey.xmlunit.XMLUnit;
import org.xml.sax.InputSource;
@@ -52,23 +53,12 @@ public class SAXOMBuilderSAXParserTest e
reader.setDTDHandler(builder);
reader.setProperty("http://xml.org/sax/properties/lexical-handler", builder);
reader.setProperty("http://xml.org/sax/properties/declaration-handler", builder);
- InputStream in = file.getAsStream();
- try {
- reader.parse(new InputSource(in));
- } finally {
- in.close();
- }
- in = file.getAsStream();
- try {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- builder.getDocument().serialize(baos);
- XMLUnit.setIgnoreAttributeOrder(true);
- assertXMLIdentical(compareXML(
- new InputSource(in),
- new InputSource(new ByteArrayInputStream(baos.toByteArray()))), true);
- } finally {
- in.close();
- }
+ reader.parse(new InputSource(file.getUrl().toString()));
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ builder.getDocument().serialize(baos);
+ XMLUnit.setIgnoreAttributeOrder(true);
+ XMLAssertEx.assertXMLIdentical(file.getUrl(),
+ new ByteArrayInputStream(baos.toByteArray()), true);
}
private static void addTests(TestSuite suite, SAXParserFactory factory, String name) throws Exception {
Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-parent/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-parent/pom.xml?rev=1366197&r1=1366196&r2=1366197&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-parent/pom.xml (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-parent/pom.xml Thu Jul 26 20:52:41 2012
@@ -465,6 +465,11 @@
<artifactId>xalan</artifactId>
<version>2.7.1</version>
</dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.9.1</version>
+ </dependency>
</dependencies>
</dependencyManagement>
<distributionManagement>
Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-testutils/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-testutils/pom.xml?rev=1366197&r1=1366196&r2=1366197&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-testutils/pom.xml (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-testutils/pom.xml Thu Jul 26 20:52:41 2012
@@ -65,6 +65,13 @@
<artifactId>xmlunit</artifactId>
</dependency>
<dependency>
+ <!-- This should not be necessary, but XMLAssertEx contains code that fails on some Java runtimes,
+ presumably because of a bug in the DOM implementation. Therefore we use a well defined
+ version of Xerces. -->
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </dependency>
+ <dependency>
<!-- We use this only for LDAP like filters -->
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>