Skip to content

Commit 0b4bbbc

Browse files
authored
Increase latchable timeout to 20s for ForcePushDownNestedQueryTest (#18816)
The MSQ query appearst to take longer than 10s. Other tests like QueryVirtualStorageTest and EmbeddedDurableShuffleStorageTest that use the same query use 20s timeout, so that should help. Also, include the timeout in the error message so it's clear rather than having to look at the stacktrace.
1 parent d342a10 commit 0b4bbbc

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

embedded-tests/src/test/java/org/apache/druid/testing/embedded/query/ForcePushDownNestedQueryTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.apache.druid.segment.TestHelper;
4141
import org.apache.druid.sql.calcite.planner.Calcites;
4242
import org.apache.druid.testing.embedded.EmbeddedClusterApis;
43+
import org.apache.druid.testing.embedded.EmbeddedDruidCluster;
4344
import org.apache.druid.testing.embedded.msq.EmbeddedMSQApis;
4445
import org.junit.jupiter.api.Assertions;
4546
import org.junit.jupiter.api.Disabled;
@@ -63,6 +64,12 @@ public class ForcePushDownNestedQueryTest extends QueryTestBase
6364
private final String interval = "2015-09-12/2015-09-13";
6465
private final Map<String, Object> forcePushDownNestedContext = Map.of("forcePushDownNestedQuery", "true");
6566

67+
@Override
68+
protected EmbeddedDruidCluster createCluster()
69+
{
70+
return super.createCluster().useDefaultTimeoutForLatchableEmitter(20);
71+
}
72+
6673
@Override
6774
public void beforeAll() throws IOException
6875
{

server/src/test/java/org/apache/druid/server/metrics/LatchableEmitter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public void waitForEvent(Predicate<Event> condition, long timeoutMillis)
126126
try {
127127
final long awaitTime = timeoutMillis >= 0 ? timeoutMillis : Long.MAX_VALUE;
128128
if (!waitCondition.countDownLatch.await(awaitTime, TimeUnit.MILLISECONDS)) {
129-
throw new ISE("Timed out waiting for event");
129+
throw new ISE("Timed out waiting for event after [%,d]ms", awaitTime);
130130
}
131131
}
132132
catch (InterruptedException e) {
@@ -152,7 +152,7 @@ public void waitForNextEvent(Predicate<Event> condition, long timeoutMillis)
152152
try {
153153
final long awaitTime = timeoutMillis >= 0 ? timeoutMillis : Long.MAX_VALUE;
154154
if (!waitCondition.countDownLatch.await(awaitTime, TimeUnit.MILLISECONDS)) {
155-
throw new ISE("Timed out waiting for next event");
155+
throw new ISE("Timed out waiting for next event after [%,d]ms", awaitTime);
156156
}
157157
}
158158
catch (InterruptedException e) {

0 commit comments

Comments
 (0)