You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by km...@apache.org on 2015/07/07 22:15:28 UTC

knox git commit: KNOX-460: UrlRewriteServletFilterTest failed with IBM JAVA

Repository: knox
Updated Branches:
  refs/heads/master 9a36b2b77 -> d268487cc


KNOX-460: UrlRewriteServletFilterTest failed with IBM JAVA


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/d268487c
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/d268487c
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/d268487c

Branch: refs/heads/master
Commit: d268487ccf566a2f8ba2c3666e50bfcef28e2462
Parents: 9a36b2b
Author: Kevin Minder <ke...@hortonworks.com>
Authored: Tue Jul 7 16:15:23 2015 -0400
Committer: Kevin Minder <ke...@hortonworks.com>
Committed: Tue Jul 7 16:15:23 2015 -0400

----------------------------------------------------------------------
 .../filter/rewrite/api/UrlRewriteServletFilterTest.java     | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/d268487c/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java
index e5000c6..de278ad 100644
--- a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java
+++ b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java
@@ -269,10 +269,13 @@ public class UrlRewriteServletFilterTest {
   @Test
   public void testInboundXmlBodyRewrite() throws Exception {
     setUp( null );
-
     String input = "<root attribute=\"http://mock-host:1/test-input-path\">http://mock-host:1/test-input-path</root>";
-    String output = "<?xml version=\"1.0\" standalone=\"no\"?><root attribute=\"http://mock-host:1/test-output-path-1\">http://mock-host:1/test-output-path-1</root>";
-
+    String output = null;
+    if(System.getProperty("java.vendor").contains("IBM")){
+      output = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><root attribute=\"http://mock-host:1/test-output-path-1\">http://mock-host:1/test-output-path-1</root>";
+    }else {
+      output = "<?xml version=\"1.0\" standalone=\"no\"?><root attribute=\"http://mock-host:1/test-output-path-1\">http://mock-host:1/test-output-path-1</root>";
+    }
     // Setup the server side request/response interaction.
     interaction.expect()
         .method( "PUT" )