Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,26 +109,27 @@ public void testConcurrentQueries() throws Exception {
CountDownLatch latch = new CountDownLatch(1);
for (int q = 0; q < numQueries; q++) {
threads[q] = new Thread(() -> {
try {
assertTrue(latch.await(1, TimeUnit.MINUTES));
} catch (InterruptedException e) {
throw new AssertionError(e);
}
safeAwait(latch);
final var pragmas = Settings.builder();
if (randomBoolean() && canUseQueryPragmas()) {
pragmas.put(randomPragmas().getSettings())
.put("task_concurrency", between(1, 2))
.put("exchange_concurrent_clients", between(1, 2));
}
run("from test-* | stats count(user) by tags", new QueryPragmas(pragmas.build())).close();
});
try (var response = run("from test-* | stats count(user) by tags", new QueryPragmas(pragmas.build()))) {
// do nothing
} catch (Exception | AssertionError e) {
logger.warn("Query failed with exception", e);
throw e;
}
}, "testConcurrentQueries");
}
for (Thread thread : threads) {
thread.start();
}
latch.countDown();
for (Thread thread : threads) {
thread.join();
thread.join(10_000);
}
}

Expand Down