dcapwell commented on code in PR #4509:
URL: https://github.com/apache/cassandra/pull/4509#discussion_r2590152082


##########
test/harry/main/org/apache/cassandra/harry/model/ASTSingleTableModel.java:
##########
@@ -753,11 +773,124 @@ public ReferenceExpression visit(ReferenceExpression r)
         return process(Who.cas, updatedCondition, lets);
     }
 
+    public Consumer<ThrowableAssert.ThrowingCallable> shouldReject(Txn txn)
+    {
+        if (!shouldApply(txn)) return null;
+        List<Mutation> mutations = null;
+        if (txn.ifBlock.isPresent()) mutations = txn.ifBlock.get().mutations;
+        else if (!txn.mutations.isEmpty()) mutations = txn.mutations;
+
+        if (mutations == null) return null;
+        Set<Consumer<Throwable>> checks = new HashSet<>();
+        for (var m : mutations)
+        {
+            var failures = shouldReject0(m);
+            if (failures != null)
+                checks.addAll(failures);
+        }
+        return toShouldRejectConsumer(checks);
+    }
+
+    public Consumer<ThrowableAssert.ThrowingCallable> shouldReject(Mutation 
mutation)
+    {
+        return toShouldRejectConsumer(shouldReject0(mutation));
+    }
+
+    private static Consumer<ThrowableAssert.ThrowingCallable> 
toShouldRejectConsumer(@Nullable Set<Consumer<Throwable>> checks)
+    {
+        return checks == null || checks.isEmpty() ? null

Review Comment:
   nope, and i explain why here: 
https://github.com/apache/cassandra/pull/4509#discussion_r2590148387



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to