jmark99 commented on code in PR #2910:
URL: https://github.com/apache/accumulo/pull/2910#discussion_r961074258


##########
test/src/main/java/org/apache/accumulo/test/TableOperationsIT.java:
##########
@@ -292,4 +295,59 @@ public void 
testCompactEmptyTablesWithBadIterator_FailsAndCancel() throws TableE
     }
   }
 
+  @Test
+  public void getTimeTypeTest() throws TableNotFoundException, 
AccumuloException,
+      TableExistsException, AccumuloSecurityException {
+    String[] tableNames = getUniqueNames(4);
+
+    // Create table with default MILLIS TimeType
+    accumuloClient.tableOperations().create(tableNames[0]);
+    TimeType timeType = 
accumuloClient.tableOperations().getTimeType(tableNames[0]);
+    assertEquals(TimeType.MILLIS, timeType);
+
+    // Create table with LOGICAL TimeType.
+    NewTableConfiguration ntc = new NewTableConfiguration();
+    ntc.setTimeType(TimeType.LOGICAL);
+    accumuloClient.tableOperations().create(tableNames[1], ntc);
+    timeType = accumuloClient.tableOperations().getTimeType(tableNames[1]);
+    assertEquals(TimeType.LOGICAL, timeType);
+
+    // Create some split points
+    SortedSet<Text> splits = new TreeSet<>();
+    splits.add(new Text("F"));
+    splits.add(new Text("M"));
+    splits.add(new Text("S"));
+
+    // Create table with MILLIS TimeType. Use splits to create multiple tablets
+    ntc = new NewTableConfiguration();
+    ntc.withSplits(splits);
+    accumuloClient.tableOperations().create(tableNames[2], ntc);

Review Comment:
   @DomGarguilo I added a comment concerning the default TimeType at table 
creation and also created a separate case for explicitly setting the TimeType 
to MILLIS.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to