knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject git commit: KNOX-445: Fix HaDescriptorManagerTest.testDescriptorStoring to be platform independent.
Date Wed, 15 Oct 2014 18:07:45 GMT
Repository: knox
Updated Branches:
  refs/heads/v0.5.0 4aa01c380 -> 78245e244


KNOX-445: Fix HaDescriptorManagerTest.testDescriptorStoring to be platform independent.

(cherry picked from commit 412fdd256dcdefa7f37f469ad27a22e6dbf966dc)


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

Branch: refs/heads/v0.5.0
Commit: 78245e2444f39d5c843adeae9c3234372b864b2d
Parents: 4aa01c3
Author: Kevin Minder <kevin.minder@hortonworks.com>
Authored: Wed Oct 15 14:06:36 2014 -0400
Committer: Kevin Minder <kevin.minder@hortonworks.com>
Committed: Wed Oct 15 14:07:30 2014 -0400

----------------------------------------------------------------------
 gateway-provider-ha/pom.xml                                     | 5 +++++
 .../gateway/ha/provider/impl/HaDescriptorManagerTest.java       | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/78245e24/gateway-provider-ha/pom.xml
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/pom.xml b/gateway-provider-ha/pom.xml
index 299745a..1d1a4e2 100644
--- a/gateway-provider-ha/pom.xml
+++ b/gateway-provider-ha/pom.xml
@@ -63,6 +63,11 @@
             <artifactId>hamcrest-library</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.xmlmatchers</groupId>
+            <artifactId>xml-matchers</artifactId>
+            <scope>test</scope>
+        </dependency>
 
         <dependency>
             <groupId>${gateway-group}</groupId>

http://git-wip-us.apache.org/repos/asf/knox/blob/78245e24/gateway-provider-ha/src/test/java/org/apache/hadoop/gateway/ha/provider/impl/HaDescriptorManagerTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/test/java/org/apache/hadoop/gateway/ha/provider/impl/HaDescriptorManagerTest.java
b/gateway-provider-ha/src/test/java/org/apache/hadoop/gateway/ha/provider/impl/HaDescriptorManagerTest.java
index 6f501a8..7c2e580 100644
--- a/gateway-provider-ha/src/test/java/org/apache/hadoop/gateway/ha/provider/impl/HaDescriptorManagerTest.java
+++ b/gateway-provider-ha/src/test/java/org/apache/hadoop/gateway/ha/provider/impl/HaDescriptorManagerTest.java
@@ -26,6 +26,8 @@ import java.io.IOException;
 import java.io.StringWriter;
 
 import static org.junit.Assert.*;
+import static org.xmlmatchers.XmlMatchers.isEquivalentTo;
+import static org.xmlmatchers.transform.XmlConverters.the;
 
 public class HaDescriptorManagerTest {
 
@@ -79,7 +81,7 @@ public class HaDescriptorManagerTest {
             "  <service enabled=\"false\" failoverSleep=\"1000\" maxFailoverAttempts=\"42\"
maxRetryAttempts=\"3\" name=\"foo\" retrySleep=\"3000\"/>\n" +
             "  <service enabled=\"true\" failoverSleep=\"5000\" maxFailoverAttempts=\"3\"
maxRetryAttempts=\"5\" name=\"bar\" retrySleep=\"8000\"/>\n" +
             "</ha>\n";
-      assertEquals(xml, descriptorXml);
+      assertThat( the( descriptorXml ), isEquivalentTo( the( xml ) ) );
    }
 
 


Mime
View raw message