hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From syuanji...@apache.org
Subject [04/26] hbase git commit: HBASE-14584 TestNamespacesInstanceModel fails on jdk8
Date Thu, 19 Nov 2015 07:33:38 GMT
HBASE-14584 TestNamespacesInstanceModel fails on jdk8

Signed-off-by: Andrew Purtell <apurtell@apache.org>


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

Branch: refs/heads/hbase-12439
Commit: dadfe7da0484be81ae09ad61f976967b9893c38d
Parents: a591df1
Author: Matt Warhaftig <mwarhaftig@gmail.com>
Authored: Sun Oct 11 16:55:49 2015 -0400
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Tue Nov 17 13:15:22 2015 -0800

----------------------------------------------------------------------
 .../hadoop/hbase/rest/model/NamespacesInstanceModel.java      | 3 ---
 .../org/apache/hadoop/hbase/rest/model/TestModelBase.java     | 7 +++----
 .../hadoop/hbase/rest/model/TestNamespacesInstanceModel.java  | 2 +-
 3 files changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/dadfe7da/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java
b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java
index 8b61b2c..b31ecf9 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/NamespacesInstanceModel.java
@@ -25,10 +25,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import javax.xml.bind.annotation.XmlAccessOrder;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAccessorOrder;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
 
@@ -51,7 +49,6 @@ import org.apache.hadoop.hbase.rest.protobuf
  */
 @XmlRootElement(name="NamespaceProperties")
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlAccessorOrder(XmlAccessOrder.ALPHABETICAL)
 @InterfaceAudience.Private
 public class NamespacesInstanceModel implements Serializable, ProtobufMessageHandler {
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/dadfe7da/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestModelBase.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestModelBase.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestModelBase.java
index 427bb9f..9cba485 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestModelBase.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestModelBase.java
@@ -112,11 +112,10 @@ public abstract class TestModelBase<T> extends TestCase {
     checkModel(fromXML(AS_XML));
   }
 
-  /**
-   * COMMENTED OUT FOR NOW. GIVES DIFFERENT RESULTS ON JDK7 vs JDK8
   public void testToXML() throws Exception {
-    assertEquals(AS_XML, toXML(buildTestModel()));
-  }**/
+    // Uses fromXML to check model because XML element ordering can be random.
+    checkModel(fromXML(toXML(buildTestModel())));
+  }
 
   public void testToJSON() throws Exception {
     try {

http://git-wip-us.apache.org/repos/asf/hbase/blob/dadfe7da/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java
index af75aa2..fe371d5 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java
@@ -86,7 +86,7 @@ public class TestNamespacesInstanceModel extends TestModelBase<NamespacesInstanc
     checkModel(buildTestModel());
   }
 
-  @Ignore("Marshalling and unmarshalling differ in jdk7 and jdk8") @Test
+  @Test
   public void testFromXML() throws Exception {
     checkModel(fromXML(AS_XML));
   }


Mime
View raw message