kevinrr888 commented on code in PR #5740:
URL: https://github.com/apache/accumulo/pull/5740#discussion_r2222869876


##########
core/src/test/java/org/apache/accumulo/core/metadata/schema/TabletMetadataTest.java:
##########
@@ -170,46 +208,84 @@ public void testAllColumns() {
     mutation.put(ExternalCompactionColumnFamily.STR_NAME, ecid.canonical(), 
ecMeta.toJson());
 
     TServerInstance tsi = new TServerInstance("localhost:9997", 5000L);
+
     MIGRATION_COLUMN.put(mutation, new Value(tsi.getHostPortSession()));
 
     SortedMap<Key,Value> rowMap = toRowMap(mutation);
 
     TabletMetadata tm = TabletMetadata.convertRow(rowMap.entrySet().iterator(),
         EnumSet.allOf(ColumnType.class), true, false);
 
+    assertFalse(tm.getCompacted().isEmpty());
+    assertEquals(Set.of(fateId1), tm.getCompacted());
+    allColumns.remove(COMPACTED);
+    assertEquals(tmm, tm.getTabletMergeability());
+    allColumns.remove(MERGEABILITY);
+    assertEquals(TabletAvailability.ONDEMAND, tm.getTabletAvailability());
+    allColumns.remove(AVAILABILITY);
+    assertEquals(1, tm.getSelectedFiles().getFiles().size());
+    assertEquals(selectedPath.toString(),
+        tm.getSelectedFiles().getFiles().iterator().next().getMetadataPath());
+    allColumns.remove(SELECTED);
+    assertEquals(opid, tm.getOperationId());
+    allColumns.remove(OPID);
+    assertFalse(tm.getHostingRequested());
+    allColumns.remove(HOSTING_REQUESTED);
+    assertEquals(suspensionTime, tm.getSuspend().suspensionTime);
+    allColumns.remove(SUSPEND);

Review Comment:
   Realized suspend has another field `server`. Would be good to check this is 
as expected as well. Can probably just have 
   ```suggestion
       assertEquals(suspendingTServer, tm.getSuspend());
       allColumns.remove(SUSPEND);
   ```
   since SuspendingTServer has an equals method. Will have to create the 
SuspendingTServer obj



##########
core/src/test/java/org/apache/accumulo/core/metadata/schema/TabletMetadataTest.java:
##########
@@ -114,9 +135,25 @@ public void testAllColumns() {
     FateId fateId1 = FateId.from(type, UUID.randomUUID());
     FateId fateId2 = FateId.from(type, UUID.randomUUID());
 
+    mutation.put(MetadataSchema.TabletsSection.CompactedColumnFamily.STR_NAME, 
fateId1.canonical(),
+        "");
+
     DIRECTORY_COLUMN.put(mutation, new Value("t-0001757"));
     FLUSH_COLUMN.put(mutation, new Value("6"));
     TIME_COLUMN.put(mutation, new Value("M123456789"));
+    Value opidValue1 = new 
Value("SPLITTING:FATE:META:12345678-9abc-def1-2345-6789abcdef12");

Review Comment:
   This can be deleted



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