DomGarguilo commented on code in PR #5853:
URL: https://github.com/apache/accumulo/pull/5853#discussion_r2322972457
##########
test/src/main/java/org/apache/accumulo/test/WriteAfterCloseIT.java:
##########
@@ -141,12 +142,24 @@ public void testWriteAfterClose(TimeType timeType,
boolean killTservers, long ti
try (AccumuloClient c = Accumulo.newClient().from(props).build()) {
c.tableOperations().create(table, ntc);
- List<Future<?>> futures = new ArrayList<>();
-
- for (int i = 0; i < 100; i++) {
- futures.add(
- executor.submit(createWriteTask(i * 1000, c, table, timeout,
useConditionalWriter)));
+ int numTasks = 100;
+ List<Future<?>> futures = new ArrayList<>(numTasks);
+ CountDownLatch startLatch = new CountDownLatch(32); // synchronize start
of a portion of the
+ // tasks
Review Comment:
I've found that waiting for many many threads in this way causes issues with
the test hanging. I think setting an upper limit in these cases makes sense
since it still adds the value of starting many at once but doesn't cause the
hanging issues.
--
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]