From daf41f90835a6a669facb29be6b0a38979d842bc Mon Sep 17 00:00:00 2001 From: Minal Kyada Date: Wed, 25 Mar 2026 16:45:13 -0700 Subject: [PATCH] fixed qt gen function --- .../service/writes/thresholds/WriteWarningsSnapshotTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/unit/org/apache/cassandra/service/writes/thresholds/WriteWarningsSnapshotTest.java b/test/unit/org/apache/cassandra/service/writes/thresholds/WriteWarningsSnapshotTest.java index c22ec7df3cf3..7da9c18c4107 100644 --- a/test/unit/org/apache/cassandra/service/writes/thresholds/WriteWarningsSnapshotTest.java +++ b/test/unit/org/apache/cassandra/service/writes/thresholds/WriteWarningsSnapshotTest.java @@ -175,11 +175,10 @@ private static Gen nonEmpty() private static Gen counter() { - Gen isEmpty = SourceDSL.booleans().all(); Constraint maxValue = Constraint.between(1, Long.MAX_VALUE); Gen gen = rs -> { - if (isEmpty.generate(rs)) + if (rs.next(Constraint.between(0, 3)) == 0) return WriteThresholdCounter.empty(); Map values = new HashMap<>(); values.put(TABLE1, rs.next(maxValue));