kevinrr888 commented on code in PR #4732:
URL: https://github.com/apache/accumulo/pull/4732#discussion_r1672281680
##########
test/src/main/java/org/apache/accumulo/test/ConditionalWriterIT.java:
##########
@@ -1536,4 +1539,33 @@ public void testNoConditions() throws AccumuloException,
AccumuloSecurityExcepti
}
}
+ @Test
+ public void testCreateConditionalWriterUsesClientProps() throws Exception {
+ // Tests that creating a conditional writer includes the client properties
that were set
+ String tableName = getUniqueNames(1)[0];
+ var clientProps = getClientProps();
+ // Set non-default values for all conditional writer props
+
clientProps.setProperty(ClientProperty.CONDITIONAL_WRITER_TIMEOUT_MAX.getKey(),
"99");
+
clientProps.setProperty(ClientProperty.CONDITIONAL_WRITER_THREADS_MAX.getKey(),
"101");
+
clientProps.setProperty(ClientProperty.CONDITIONAL_WRITER_DURABILITY.getKey(),
+ Durability.NONE.name());
+ try (AccumuloClient client =
Accumulo.newClient().from(clientProps).build()) {
+ client.tableOperations().create(tableName);
+
+ try (
+ ConditionalWriterImpl cw1 =
+ (ConditionalWriterImpl)
client.createConditionalWriter(tableName);
+ ConditionalWriterImpl cw2 = (ConditionalWriterImpl) client
+ .createConditionalWriter(tableName, new
ConditionalWriterConfig())) {
Review Comment:
Good idea. Done
--
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]