This is an automated email from the ASF dual-hosted git repository.
abhishek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new dbd45daf33 Flakiness and exceptions during tests (#12705)
dbd45daf33 is described below
commit dbd45daf33f5d94ee0172edb9fa2744914b6dcc6
Author: Abhishek Agarwal <[email protected]>
AuthorDate: Tue Jun 28 10:36:23 2022 +0530
Flakiness and exceptions during tests (#12705)
---
.../java/org/apache/druid/tests/security/ITTLSTest.java | 8 ++++++--
.../druid/query/groupby/GroupByQueryRunnerFailureTest.java | 13 ++++++++++++-
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git
a/integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java
b/integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java
index 09167c087c..d1c60b34f4 100644
---
a/integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java
+++
b/integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java
@@ -53,6 +53,7 @@ import org.testng.annotations.Test;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLException;
import javax.ws.rs.core.MediaType;
+
import java.io.IOException;
import java.net.URL;
@@ -445,8 +446,11 @@ public class ITTLSTest
catch (RuntimeException re) {
Throwable rootCause = Throwables.getRootCause(re);
- if (rootCause instanceof IOException && ("Broken
pipe".equals(rootCause.getMessage())
- || "Connection reset by
peer".contains(rootCause.getMessage()))) {
+ if (rootCause instanceof IOException
+ && (null != rootCause.getMessage())
+ && ("Broken pipe".equals(rootCause.getMessage())
+ || "Connection reset by peer".contains(rootCause.getMessage()))
+ ) {
if (retries > MAX_CONNECTION_EXCEPTION_RETRIES) {
Assert.fail(StringUtils.format(
"Broken pipe / connection reset retries exhausted, test
failed, did not get %s.",
diff --git
a/processing/src/test/java/org/apache/druid/query/groupby/GroupByQueryRunnerFailureTest.java
b/processing/src/test/java/org/apache/druid/query/groupby/GroupByQueryRunnerFailureTest.java
index acb52cc057..9ba93ef63d 100644
---
a/processing/src/test/java/org/apache/druid/query/groupby/GroupByQueryRunnerFailureTest.java
+++
b/processing/src/test/java/org/apache/druid/query/groupby/GroupByQueryRunnerFailureTest.java
@@ -29,6 +29,7 @@ import org.apache.druid.collections.CloseableStupidPool;
import org.apache.druid.collections.ReferenceCountingResourceHolder;
import org.apache.druid.java.util.common.concurrent.Execs;
import org.apache.druid.java.util.common.granularity.Granularities;
+import org.apache.druid.java.util.common.guava.Sequences;
import org.apache.druid.query.DruidProcessingConfig;
import org.apache.druid.query.QueryCapacityExceededException;
import org.apache.druid.query.QueryContexts;
@@ -296,7 +297,17 @@ public class GroupByQueryRunnerFailureTest
}
}
);
- QueryRunner<ResultRow> mergeRunners =
factory.mergeRunners(Execs.directExecutor(), ImmutableList.of(runner));
+ QueryRunner<ResultRow> mockRunner = (queryPlus, responseContext) -> {
+ try {
+ Thread.sleep(100);
+ }
+ catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ return Sequences.empty();
+ };
+
+ QueryRunner<ResultRow> mergeRunners =
factory.mergeRunners(Execs.directExecutor(), ImmutableList.of(runner,
mockRunner));
GroupByQueryRunnerTestHelper.runQuery(factory, mergeRunners, query);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]