You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/06/12 03:47:40 UTC
[GitHub] [druid] paul-rogers opened a new issue, #12639: Flaky test: DruidAvaticaJsonHandlerTest & base class
paul-rogers opened a new issue, #12639:
URL: https://github.com/apache/druid/issues/12639
When debugging an issue, tried to run `DruidAvaticaJsonHandlerTest` in an IDE. Ran into a number of issues. First, `DruidAvaticaJsonHandlerTest` is a derived class, with `DruidAvaticaHandlerTest` as the base class. This means that the IDE cannot easily run the tests in the base class using the methods in the derived class. The tests should be restructured so that tests only appear in base classes.
Next, when running the entire class in an IDE, three methods are flaky.
* `testConcurrentQueries()` failed one time in the IDE, apparently with an NPE, worked other times.
* `testTimestampsInResponse()` failed, perhaps because the Mac running the test is not in the expected (UTC?) time zone?
* `testTimestampsInResponseLosAngelesTimeZone()` failed with the same issue.
Reason for suspecting the test depends on the host timezone: it runs in Travis, fails on the Mac, with this error:
```text
java.lang.AssertionError: expected:<
[{__time=1999-12-31 08:00:00.0, t2=1999-12-30}]> but was:<
[{__time=1999-12-31 16:00:00.0, t2=1999-12-31}]>
```
--
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: commits-unsubscribe@druid.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] gianm commented on issue #12639: Flaky test: DruidAvaticaJsonHandlerTest & base class
Posted by GitBox <gi...@apache.org>.
gianm commented on issue #12639:
URL: https://github.com/apache/druid/issues/12639#issuecomment-1156807762
You should be able to fix the timestamp ones by setting the option in your IDE to respect the Surefire `argLine` during test execution. There is one in there that sets the `user.timezone=UTC`, which is how Druid servers get run in production too.
For `testConcurrentQueries`, I saw a Travis failure recently here: https://app.travis-ci.com/github/apache/druid/jobs/573579841. It's a little hard to follow the stack trace because of how long the messages are. But this appears in them and seems interesting: `NullPointerException: Cannot invoke "java.util.Map.entrySet()" because "map" is null`.
```
[ERROR] org.apache.druid.sql.avatica.DruidAvaticaJsonHandlerTest.testConcurrentQueries Time elapsed: 3.27 s <<< ERROR!
java.util.concurrent.ExecutionException: java.lang.RuntimeException: org.apache.calcite.avatica.AvaticaSqlException: Error -1 (00000) : Error while executing SQL "SELECT COUNT(*) + 198 AS ci FROM foo": Remote driver error: QueryInterruptedException: java.lang.RuntimeException: Error while applying rule DruidOuterQueryRel(SELECT_PROJECT), args [rel#284910:LogicalProject.NONE.[](input=RelSubset#284909,ci=+($0, 198)), rel#285014:DruidQueryRel.NONE.[](query={"queryType":"timeseries","dataSource":{"type":"table","name":"foo"},"intervals":{"type":"intervals","intervals":["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},"descending":false,"virtualColumns":[],"filter":null,"granularity":{"type":"all"},"aggregations":[{"type":"count","name":"a0"}],"postAggregations":[],"limit":2147483647,"context":{"nativeQueryIds":"[8994ef1e-cf63-4631-bd6c-1792d25f306e]","sqlQueryId":"d5f27d60-00bf-449d-bc25-10eac48f63ed","sqlStringifyArrays":false}},signature={a0:LONG})] -> RuntimeExcepti
on: java.lang.RuntimeException: Error while applying rule DruidOuterQueryRel(SELECT_PROJECT), args [rel#284910:LogicalProject.NONE.[](input=RelSubset#284909,ci=+($0, 198)), rel#285014:DruidQueryRel.NONE.[](query={"queryType":"timeseries","dataSource":{"type":"table","name":"foo"},"intervals":{"type":"intervals","intervals":["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},"descending":false,"virtualColumns":[],"filter":null,"granularity":{"type":"all"},"aggregations":[{"type":"count","name":"a0"}],"postAggregations":[],"limit":2147483647,"context":{"nativeQueryIds":"[8994ef1e-cf63-4631-bd6c-1792d25f306e]","sqlQueryId":"d5f27d60-00bf-449d-bc25-10eac48f63ed","sqlStringifyArrays":false}},signature={a0:LONG})] -> RuntimeException: Error while applying rule DruidOuterQueryRel(SELECT_PROJECT), args [rel#284910:LogicalProject.NONE.[](input=RelSubset#284909,ci=+($0, 198)), rel#285014:DruidQueryRel.NONE.[](query={"queryType":"timeseries","dataSource":{"type":"table","name":"f
oo"},"intervals":{"type":"intervals","intervals":["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},"descending":false,"virtualColumns":[],"filter":null,"granularity":{"type":"all"},"aggregations":[{"type":"count","name":"a0"}],"postAggregations":[],"limit":2147483647,"context":{"nativeQueryIds":"[8994ef1e-cf63-4631-bd6c-1792d25f306e]","sqlQueryId":"d5f27d60-00bf-449d-bc25-10eac48f63ed","sqlStringifyArrays":false}},signature={a0:LONG})] -> NullPointerException: Cannot invoke "java.util.Map.entrySet()" because "map" is null
at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)
at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
at org.apache.druid.sql.avatica.DruidAvaticaHandlerTest.testConcurrentQueries(DruidAvaticaHandlerTest.java:748)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.RuntimeException: org.apache.calcite.avatica.AvaticaSqlException: Error -1 (00000) : Error while executing SQL "SELECT COUNT(*) + 198 AS ci FROM foo": Remote driver error: QueryInterruptedException: java.lang.RuntimeException: Error while applying rule DruidOuterQueryRel(SELECT_PROJECT), args [rel#284910:LogicalProject.NONE.[](input=RelSubset#284909,ci=+($0, 198)), rel#285014:DruidQueryRel.NONE.[](query={"queryType":"timeseries","dataSource":{"type":"table","name":"foo"},"intervals":{"type":"intervals","intervals":["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},"descending":false,"virtualColumns":[],"filter":null,"granularity":{"type":"all"},"aggregations":[{"type":"count","name":"a0"}],"postAggregations":[],"limit":2147483647,"context":{"nativeQueryIds":"[8994ef1e-cf63-4631-bd6c-1792d25f306e]","sqlQueryId":"d5f27d60-00bf-449d-bc25-10eac48f63ed","sqlStringifyArrays":false}},signature={a0:LONG})] -> RuntimeException: java.lang.RuntimeException
: Error while applying rule DruidOuterQueryRel(SELECT_PROJECT), args [rel#284910:LogicalProject.NONE.[](input=RelSubset#284909,ci=+($0, 198)), rel#285014:DruidQueryRel.NONE.[](query={"queryType":"timeseries","dataSource":{"type":"table","name":"foo"},"intervals":{"type":"intervals","intervals":["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},"descending":false,"virtualColumns":[],"filter":null,"granularity":{"type":"all"},"aggregations":[{"type":"count","name":"a0"}],"postAggregations":[],"limit":2147483647,"context":{"nativeQueryIds":"[8994ef1e-cf63-4631-bd6c-1792d25f306e]","sqlQueryId":"d5f27d60-00bf-449d-bc25-10eac48f63ed","sqlStringifyArrays":false}},signature={a0:LONG})] -> RuntimeException: Error while applying rule DruidOuterQueryRel(SELECT_PROJECT), args [rel#284910:LogicalProject.NONE.[](input=RelSubset#284909,ci=+($0, 198)), rel#285014:DruidQueryRel.NONE.[](query={"queryType":"timeseries","dataSource":{"type":"table","name":"foo"},"intervals":{"type":"inte
rvals","intervals":["-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"]},"descending":false,"virtualColumns":[],"filter":null,"granularity":{"type":"all"},"aggregations":[{"type":"count","name":"a0"}],"postAggregations":[],"limit":2147483647,"context":{"nativeQueryIds":"[8994ef1e-cf63-4631-bd6c-1792d25f306e]","sqlQueryId":"d5f27d60-00bf-449d-bc25-10eac48f63ed","sqlStringifyArrays":false}},signature={a0:LONG})] -> NullPointerException: Cannot invoke "java.util.Map.entrySet()" because "map" is null
at org.apache.druid.sql.avatica.DruidAvaticaHandlerTest.lambda$testConcurrentQueries$0(DruidAvaticaHandlerTest.java:742)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
... 1 more
```
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [I] Flaky test: DruidAvaticaJsonHandlerTest & base class (druid)
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #12639:
URL: https://github.com/apache/druid/issues/12639#issuecomment-1905064461
This issue has been closed due to lack of activity. If you think that
is incorrect, or the issue requires additional review, you can revive the issue at
any time.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [I] Flaky test: DruidAvaticaJsonHandlerTest & base class (druid)
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #12639: Flaky test: DruidAvaticaJsonHandlerTest & base class
URL: https://github.com/apache/druid/issues/12639
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [I] Flaky test: DruidAvaticaJsonHandlerTest & base class (druid)
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #12639:
URL: https://github.com/apache/druid/issues/12639#issuecomment-1869163070
This issue has been marked as stale due to 280 days of inactivity.
It will be closed in 4 weeks if no further activity occurs. If this issue is still
relevant, please simply write any comment. Even if closed, you can still revive the
issue at any time or discuss it on the dev@druid.apache.org list.
Thank you for your contributions.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org