This is an automated email from the ASF dual-hosted git repository.
domgarguilo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new 0863c9e124 Fix TestAmple shared writer overrides (#5774)
0863c9e124 is described below
commit 0863c9e12498930e7052b6eff4cef246c05b9780
Author: Dom G. <[email protected]>
AuthorDate: Mon Aug 4 14:05:55 2025 -0400
Fix TestAmple shared writer overrides (#5774)
* added memoized shared writers in TestAmple
---
.../accumulo/test/ample/metadata/TestAmple.java | 32 ++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git
a/test/src/main/java/org/apache/accumulo/test/ample/metadata/TestAmple.java
b/test/src/main/java/org/apache/accumulo/test/ample/metadata/TestAmple.java
index 042d61d15c..3fdba6be7a 100644
--- a/test/src/main/java/org/apache/accumulo/test/ample/metadata/TestAmple.java
+++ b/test/src/main/java/org/apache/accumulo/test/ample/metadata/TestAmple.java
@@ -258,6 +258,38 @@ public class TestAmple {
public void setServiceLock(ServiceLock lock) {
context.setServiceLock(lock);
}
+
+ private final java.util.function.Supplier<ConditionalWriter>
sharedMetadataWriter =
+ Suppliers.memoize(() -> {
+ try {
+ return new ConditionalWriterDelegator(
+
createConditionalWriter(ample.tables.get(Ample.DataLevel.METADATA)),
+ ample.cwInterceptor.get());
+ } catch (TableNotFoundException e) {
+ throw new RuntimeException(e);
+ }
+ });
+
+ private final java.util.function.Supplier<ConditionalWriter>
sharedUserWriter =
+ Suppliers.memoize(() -> {
+ try {
+ return new ConditionalWriterDelegator(
+
createConditionalWriter(ample.tables.get(Ample.DataLevel.USER)),
+ ample.cwInterceptor.get());
+ } catch (TableNotFoundException e) {
+ throw new RuntimeException(e);
+ }
+ });
+
+ @Override
+ public java.util.function.Supplier<ConditionalWriter>
getSharedMetadataWriter() {
+ return sharedMetadataWriter;
+ }
+
+ @Override
+ public java.util.function.Supplier<ConditionalWriter>
getSharedUserWriter() {
+ return sharedUserWriter;
+ }
};
}