You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/04/18 15:44:50 UTC

[GitHub] [accumulo] ctubbsii commented on a change in pull request #1105: Issue-1104_DocumentAndTestKeyConstructorsForCopyBehavior updated java…

ctubbsii commented on a change in pull request #1105: Issue-1104_DocumentAndTestKeyConstructorsForCopyBehavior updated java…
URL: https://github.com/apache/accumulo/pull/1105#discussion_r276722930
 
 

 ##########
 File path: core/src/test/java/org/apache/accumulo/core/data/KeyTest.java
 ##########
 @@ -79,6 +79,144 @@ public void testCopyData() {
     assertEquals(k1, k2);
 
   }
+  
+  @Test
+  public void testCopyDataWithByteArrayConstructors() {
+    byte[] row = "r".getBytes();
+    byte[] cf = "cf".getBytes();
+    byte[] cq = "cq".getBytes();
+    byte[] cv = "cv".getBytes();
+
+    Key kRow = new Key(row);
+    Key kRowcolFam = new Key(row, cf);
+    Key kRowcolFamColQual = new Key(row, cf, cq);
+    Key kRowcolFamColQualColVis = new Key(row, cf, cq, cv);
+    Key kRowcolFamColQualColVisTimeStamp = new Key(row, cf, cq, cv, 5L);
+
+    // test row constructor
+    assertNotSame(row, kRow.getRowBytes());
 
 Review comment:
   Since these can be not the same for a variety of reasons, we probably want to check they are both not the same, and yet still equal.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services