You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2018/10/25 14:19:44 UTC

[cxf] branch master updated: Fix Stax2ValidationUtilsTest to not rely on a HashMap order of schemas.

This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new ca6b394  Fix Stax2ValidationUtilsTest to not rely on a HashMap order of schemas.
ca6b394 is described below

commit ca6b394c63185a7c44ad91bc2212c947c60acc38
Author: Daniel Kulp <dk...@apache.org>
AuthorDate: Thu Oct 25 10:18:52 2018 -0400

    Fix Stax2ValidationUtilsTest to not rely on a HashMap order of schemas.
---
 .../apache/cxf/staxutils/validation/Stax2ValidationUtilsTest.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/core/src/test/java/org/apache/cxf/staxutils/validation/Stax2ValidationUtilsTest.java b/core/src/test/java/org/apache/cxf/staxutils/validation/Stax2ValidationUtilsTest.java
index d6cc958..b31b3df 100644
--- a/core/src/test/java/org/apache/cxf/staxutils/validation/Stax2ValidationUtilsTest.java
+++ b/core/src/test/java/org/apache/cxf/staxutils/validation/Stax2ValidationUtilsTest.java
@@ -118,11 +118,13 @@ public class Stax2ValidationUtilsTest {
     @Before
     public void setUp() throws Exception {
         XmlSchemaCollection schemaCol = new XmlSchemaCollection();
+        
         InputStream io = getClass().getClassLoader().getResourceAsStream(schemaPath);
+        String sysId = getClass().getClassLoader().getResource(schemaPath).toString();
         schemaCol.setBaseUri(getTestBaseURI());
-        schemaCol.read(new StreamSource(io));
+        schemaCol.read(new StreamSource(io, sysId));
         serviceInfo.addSchema(schemaInfo);
-        schemaInfo.setSchema(schemaCol.getXmlSchemas()[0]);
+        schemaInfo.setSchema(schemaCol.getXmlSchema(sysId)[0]);
         expect(endpoint.get(anyObject())).andReturn(null);
         expect(endpoint.containsKey(anyObject())).andReturn(false);
         expect(endpoint.put(anyString(), anyObject())).andReturn(null);