DomGarguilo commented on code in PR #4160:
URL: https://github.com/apache/accumulo/pull/4160#discussion_r1457873792


##########
test/src/main/java/org/apache/accumulo/test/fate/accumulo/FateMutatorImplIT.java:
##########
@@ -88,6 +89,65 @@ public void putRepo() throws Exception {
     }
   }
 
+  @Test
+  public void requireStatus() throws Exception {
+    final String table = getUniqueNames(1)[0];
+    try (AccumuloClient client = 
Accumulo.newClient().from(getClientProps()).build()) {
+      client.tableOperations().create(table, ntc);
+
+      ClientContext context = (ClientContext) client;
+
+      final long tid = RANDOM.get().nextLong() & 0x7fffffffffffffffL;
+
+      // use require status passing all statuses. without the status column 
present this should fail
+      // FateMutatorImpl<FateIT.TestEnv> fateMutator = new 
FateMutatorImpl<>(context, table, tid);
+      // assertThrows(IllegalStateException.class,
+      // () -> fateMutator.requireStatus(ReadOnlyFateStore.TStatus.values())
+      // .putStatus(ReadOnlyFateStore.TStatus.NEW).mutate());
+      //
+      // logAllEntriesInTable(table, client); // this prints nothing on the 
table as we expect
+
+      // use require status without passing any statuses to require that the 
status column is absent
+      FateMutatorImpl<FateIT.TestEnv> fateMutator0 = new 
FateMutatorImpl<>(context, table, tid);
+      
fateMutator0.requireStatus().putStatus(ReadOnlyFateStore.TStatus.NEW).mutate();

Review Comment:
   Right now with this portion commented out, the test passes. The bottom 
portion adds a `requireStatus` with no params which should ensure that the 
status column does not exist. The weird part is, when i uncomment the top 
portion, it causes this check to fail even though (as verified by printing all 
entries on the table) the status column still does not exist. I am not sure 
what is causing the condition to fail at this point.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to