This is an automated email from the ASF dual-hosted git repository.
dcapwell pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git
The following commit(s) were added to refs/heads/trunk by this push:
new cf802f81 Fix failing tests for TrackerReconcilerTest (#288)
cf802f81 is described below
commit cf802f81333e896d860e0e2bb8f412e4560a4d1b
Author: Alan Wang <[email protected]>
AuthorDate: Wed Aug 19 11:23:09 2026 -0700
Fix failing tests for TrackerReconcilerTest (#288)
patch by Alan Wang; reviewed by Ariel Weisberg, David Capwell for
CASSANDRA-21574
---
.../java/accord/coordinate/tracking/FastPathTrackerReconciler.java | 3 ++-
accord-core/src/test/java/accord/topology/TopologyRandomizer.java | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git
a/accord-core/src/test/java/accord/coordinate/tracking/FastPathTrackerReconciler.java
b/accord-core/src/test/java/accord/coordinate/tracking/FastPathTrackerReconciler.java
index b10f8b55..1c852fd9 100644
---
a/accord-core/src/test/java/accord/coordinate/tracking/FastPathTrackerReconciler.java
+++
b/accord-core/src/test/java/accord/coordinate/tracking/FastPathTrackerReconciler.java
@@ -66,7 +66,8 @@ public class FastPathTrackerReconciler extends
TrackerReconciler<FastPathShardTr
case Success:
Assertions.assertTrue(tracker.all(FastPathShardTracker::hasReachedQuorum));
- Assertions.assertTrue(tracker.all(shard ->
shard.fastPathIsRejected() || shard.hasMetFastPathCriteria() ||
shard.fastPathIsDelayed()));
+ // Covers the conditions which allow Success to be returned in
FastPathTracker.java
+ Assertions.assertTrue(tracker.all(shard ->
shard.fastPathIsRejected() || shard.hasMetFastPathCriteria() ||
shard.fastPathIsDelayed() || (shard.fastPathFailures + shard.fastPathDelayed >
0)));
Assertions.assertFalse(tracker.any(FastPathShardTracker::hasFailed));
break;
diff --git a/accord-core/src/test/java/accord/topology/TopologyRandomizer.java
b/accord-core/src/test/java/accord/topology/TopologyRandomizer.java
index c778e707..06d54fa9 100644
--- a/accord-core/src/test/java/accord/topology/TopologyRandomizer.java
+++ b/accord-core/src/test/java/accord/topology/TopologyRandomizer.java
@@ -430,6 +430,11 @@ public class TopologyRandomizer
private boolean previousEpochForRegainedRangeRetired(Topology current,
Ranges regainingRanges)
{
+ // When nodeLookup isn't defined we are unable to get node state, so
+ // assume that the calling test doesn't care about retired ranges
+ if (this.nodeLookup == null)
+ return true;
+
for (Id id : current.nodes())
{
Node node = this.nodeLookup.apply(id);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]