This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch cassandra-6.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/cassandra-6.0 by this push:
new 35ff990127 Fix OnHeapGraphSimulationTest after CASSANDRA-21644 changes.
35ff990127 is described below
commit 35ff990127ec80902c3ea87a3b8ad6742cd3c4ae
Author: Jeremiah Jordan <[email protected]>
AuthorDate: Thu Oct 1 05:44:10 2026 -0500
Fix OnHeapGraphSimulationTest after CASSANDRA-21644 changes.
Add the new limitsConcurrentWritesTo function to the Memtable proxy in
OnHeapGraphSimulationTest and
update VectorMemoryIndexSimulationTest to check the name not the type to
proxy it.
patch by Jeremiah Jordan; reviewed by Caleb Rackliffe for CASSANDRA-21644
---
.../apache/cassandra/simulator/test/OnHeapGraphSimulationTest.java | 4 +++-
.../cassandra/simulator/test/VectorMemoryIndexSimulationTest.java | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git
a/test/simulator/test/org/apache/cassandra/simulator/test/OnHeapGraphSimulationTest.java
b/test/simulator/test/org/apache/cassandra/simulator/test/OnHeapGraphSimulationTest.java
index 04d9120ed3..71e827ff31 100644
---
a/test/simulator/test/org/apache/cassandra/simulator/test/OnHeapGraphSimulationTest.java
+++
b/test/simulator/test/org/apache/cassandra/simulator/test/OnHeapGraphSimulationTest.java
@@ -249,7 +249,8 @@ public class OnHeapGraphSimulationTest extends
SimulationTestBase
null
);
// Use a JDK proxy — Mockito cannot operate inside the
InstanceClassLoader.
- // OnHeapGraph only checks memtable != null and calls
getClass().getSimpleName() + hashCode().
+ // OnHeapGraph checks memtable != null, calls
getClass().getSimpleName() + hashCode(), and calls
+ // limitsConcurrentWritesTo() to see if the memtable limits its own
concurrent inserts.
Memtable memtable = (Memtable)
java.lang.reflect.Proxy.newProxyInstance(
Memtable.class.getClassLoader(),
new Class<?>[]{ Memtable.class },
@@ -257,6 +258,7 @@ public class OnHeapGraphSimulationTest extends
SimulationTestBase
if ("hashCode".equals(method.getName())) return
System.identityHashCode(proxy);
if ("toString".equals(method.getName())) return
"SimulatedMemtable";
if ("equals".equals(method.getName())) return proxy == args[0];
+ if ("limitsConcurrentWritesTo".equals(method.getName()))
return false;
return null;
}
);
diff --git
a/test/simulator/test/org/apache/cassandra/simulator/test/VectorMemoryIndexSimulationTest.java
b/test/simulator/test/org/apache/cassandra/simulator/test/VectorMemoryIndexSimulationTest.java
index 5d6c1917fe..0ddb891a07 100644
---
a/test/simulator/test/org/apache/cassandra/simulator/test/VectorMemoryIndexSimulationTest.java
+++
b/test/simulator/test/org/apache/cassandra/simulator/test/VectorMemoryIndexSimulationTest.java
@@ -635,7 +635,7 @@ public class VectorMemoryIndexSimulationTest extends
SimulationTestBase
if ("hashCode".equals(method.getName())) return
System.identityHashCode(proxy);
if ("toString".equals(method.getName())) return
"SimulatedMemtable";
if ("equals".equals(method.getName())) return proxy ==
args[0];
- if (method.getReturnType() == boolean.class) return false;
+ if ("limitsConcurrentWritesTo".equals(method.getName()))
return false;
return null;
}
);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]