DomGarguilo commented on code in PR #2794:
URL: https://github.com/apache/accumulo/pull/2794#discussion_r910355545
##########
minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java:
##########
@@ -210,6 +210,11 @@ public void testPerTableClasspath() throws Exception {
conn.instanceOperations().setProperty(VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() +
"cx1",
jarFile.toURI().toString());
+ // Batchwriter is intermittently failing with a constraint violation
because the TabletServer
+ // is not seeing the property changes above before the BatchWriter below
closes and a
+ // MutationsRejectedException is being thrown.
+ Thread.sleep(5000);
Review Comment:
Would something like this work instead of just the sleep to make sure the
property is set?
```suggestion
String classpathKey = VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "cx1";
String classpathValue = jarFile.toURI().toString();
conn.instanceOperations().setProperty(classpathKey, classpathValue);
Map<String,String> systemConfiguration =
conn.instanceOperations().getSystemConfiguration();
while (!systemConfiguration.containsKey(classpathKey)
|| !systemConfiguration.get(classpathKey).equals(classpathValue)) {
log.info("Expected {} but instead found {}. Sleeping for 1000ms",
classpathValue,
systemConfiguration.get(classpathKey));
Thread.sleep(1000);
systemConfiguration =
conn.instanceOperations().getSystemConfiguration();
}
```
I haven't been able to replicate the test failure but the test passes with
the changes above.
--
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]