Description
For example https://builds.apache.org/job/PreCommit-Lens-Build/739/ has 21 failed tests :
Test Result (21 failures / +20)
org.apache.lens.server.query.QueryAPIErrorResponseTest.testExplainRuntimeException
org.apache.lens.server.query.QueryAPIErrorResponseTest.testExplainRuntimeException
org.apache.lens.server.query.QueryAPIErrorResponseTest.testExplainWebappException
org.apache.lens.server.query.QueryAPIErrorResponseTest.testExplainWebappException
org.apache.lens.server.query.TestQueryEndEmailNotifier.testLaunchFailure
org.apache.lens.server.query.TestQueryEndEmailNotifier.testLaunchFailure
org.apache.lens.server.query.TestQueryService.testEstimateGauges
org.apache.lens.server.query.TestQueryService.testEstimateGauges
org.apache.lens.server.query.TestQueryService.testExecuteWithTimeoutAndPreFetchAndServerPersistence
org.apache.lens.server.query.TestQueryService.testExecuteWithTimeoutAndPreFetchAndServerPersistence
org.apache.lens.server.query.TestQueryService.testExecuteWithTimeoutAndPreFetchAndServerPersistence
org.apache.lens.server.query.TestQueryService.testExecuteWithTimeoutAndPreFetchAndServerPersistence
org.apache.lens.server.query.TestQueryService.testExecuteWithTimeoutAndPreFetchAndServerPersistence
org.apache.lens.server.query.TestQueryService.testHiveSemanticFailure
org.apache.lens.server.query.TestQueryService.testHiveSemanticFailure
org.apache.lens.server.query.TestQueryService.testLaunchFail
org.apache.lens.server.query.TestQueryService.testLaunchFail
org.apache.lens.server.query.TestQueryService.testLoadingMultipleDrivers
org.apache.lens.server.query.TestQueryService.testMultipleLaunches
org.apache.lens.server.query.TestQueryService.testMultipleLaunches
org.apache.lens.server.query.TestQueryService.testPriorityOnMockQuery
Attachments
Attachments
- LENS-1239.patch
- 14 kB
- Amareshwari Sriramadasu
- LENS-1239.3.patch
- 25 kB
- Amareshwari Sriramadasu
- LENS-1239.2.patch
- 16 kB
- Amareshwari Sriramadasu
Activity
The following failure logs are helpful in debugging :
java.lang.AssertionError: expected [4] but found [2]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.failNotEquals(Assert.java:494)
at org.testng.Assert.assertEquals(Assert.java:123)
at org.testng.Assert.assertEquals(Assert.java:370)
at org.testng.Assert.assertEquals(Assert.java:380)
at org.apache.lens.server.query.TestQueryService.testLoadingMultipleDrivers(TestQueryService.java:240)
[gc.PS-MarkSweep.count, gc.PS-MarkSweep.time, gc.PS-Scavenge.count, gc.PS-Scavenge.time, jvm.name, jvm.uptime, jvm.vendor, lens.MethodMetricGauge.TestQueryService-testEstimateGaugesxml-DRIVER_SELECTION, lens.MethodMetricGauge.TestQueryService-testEstimateGaugesxml-PARALLEL_ESTIMATE, lens.MethodMetricGauge.TestQueryService-testEstimateGaugesxml-hive/hive1-CUBE_REWRITE, lens.MethodMetricGauge.TestQueryService-testEstimateGaugesxml-hive/hive1-DRIVER_ESTIMATE, lens.MethodMetricGauge.TestQueryService-testEstimateGaugesxml-hive/hive1-RewriteUtil-rewriteQuery, lens.MethodMetricGauge.TestQueryService-testEstimateGaugesxml-hive/hive1-driverEstimate, lens.MethodMetricGauge.TestQueryService-testEstimateGaugesxml-hive/hive2-CUBE_REWRITE, lens.MethodMetricGauge.TestQueryService-testEstimateGaugesxml-hive/hive2-DRIVER_ESTIMATE, lens.MethodMetricGauge.TestQueryService-testEstimateGaugesxml-hive/hive2-RewriteUtil-rewriteQuery, lens.MethodMetricGauge.TestQueryService-testEstimateGaugesxml-hive/hive2-driverEstimate, memory.heap.committed, memory.heap.init, memory.heap.max, memory.heap.usage, memory.heap.used, memory.non-heap.committed, memory.non-heap.init, memory.non-heap.max, memory.non-heap.usage, memory.non-heap.used, memory.pools.Code-Cache.usage, memory.pools.Compressed-Class-Space.usage, memory.pools.Metaspace.usage, memory.pools.PS-Eden-Space.usage, memory.pools.PS-Old-Gen.usage, memory.pools.PS-Survivor-Space.usage, memory.total.committed, memory.total.init, memory.total.max, memory.total.used, org.apache.lens.server.api.query.QueryExecutionService.finished-queries, org.apache.lens.server.api.query.QueryExecutionService.launching-queries, org.apache.lens.server.api.query.QueryExecutionService.queued-queries, org.apache.lens.server.api.query.QueryExecutionService.running-queries, org.apache.lens.server.api.query.QueryExecutionService.waiting-queries, org.apache.lens.server.api.session.SessionService.active-sessions, threads.blocked.count, threads.count, threads.daemon.count, threads.deadlock.count, threads.deadlocks, threads.new.count, threads.runnable.count, threads.terminated.count, threads.timed_waiting.count, threads.waiting.count] expected [true] but found [false]
Patch with changes. Review request - https://reviews.apache.org/r/50483
Applied patch: LENS-1239.patch and ran command: mvn clean install -fae. Result: Failure. Build Job: https://builds.apache.org/job/PreCommit-Lens-Build/742/
Have seen one more failure in local build :
org.apache.lens.server.query.TestQueryConstraints.setupTest (from TestSuite)
Error Message
Could not recover from persisted state
Stacktrace
java.lang.RuntimeException: Could not recover from persisted state at org.apache.lens.server.api.query.DriverSelectorQueryContext.setDriverQuery(DriverSelectorQueryContext.java:175) at org.apache.lens.server.api.query.AbstractQueryContext.setDriverQuery(AbstractQueryContext.java:450) at org.apache.lens.server.query.QueryExecutionServiceImpl.readExternal(QueryExecutionServiceImpl.java:2843) at org.apache.lens.server.LensServices.setupPersistedState(LensServices.java:337) at org.apache.lens.server.LensServices.init(LensServices.java:270) at org.apache.lens.server.LensJerseyTest.restartLensServer(LensJerseyTest.java:251) at org.apache.lens.server.LensJerseyTest.restartLensServer(LensJerseyTest.java:237) at org.apache.lens.server.query.TestQueryConstraints.setupTest(TestQueryConstraints.java:103)
27 Jul 2016 05:22:39 [1e2a0510-c844-4c46-9e7b-a115259b36ec] [main] ERROR org.apache.lens.server.LensServices - Could not recover from persisted state java.lang.NullPointerException: null at org.apache.lens.server.api.query.DriverSelectorQueryContext.setDriverQuery(DriverSelectorQueryContext.java:175) ~[lens-server-api-2.6.0-beta-SNAPSHOT.jar:2.6.0-beta-SNAPSHOT] at org.apache.lens.server.api.query.AbstractQueryContext.setDriverQuery(AbstractQueryContext.java:450) ~[lens-server-api-2.6.0-beta-SNAPSHOT.jar:2.6.0-beta-SNAPSHOT] at org.apache.lens.server.query.QueryExecutionServiceImpl.readExternal(QueryExecutionServiceImpl.java:2843) ~[classes/:na]
Updated patch fixed the failure.
Applied patch: LENS-1239.patch and ran command: mvn clean install -fae. Result: Failure. Build Job: https://builds.apache.org/job/PreCommit-Lens-Build/743/
Applied patch: LENS-1239.2.patch and ran command: mvn clean install -fae. Result: Failure. Build Job: https://builds.apache.org/job/PreCommit-Lens-Build/745/
org.apache.lens.client.TestLensClient.testWaitForQueryToCompleteWithAndWithoutRetryOnTimeOut is failing. The test is waiting for 3 seconds as the timeout, seems the query is finishing in two seconds.
java.lang.AssertionError: SocketTimeoutException was expected
at org.testng.Assert.fail(Assert.java:94)
at org.apache.lens.client.TestLensClient.testWaitForQueryToCompleteWithAndWithoutRetryOnTimeOut(TestLensClient.java:288)
Jul 27, 2016 5:47:35 AM org.glassfish.jersey.filter.LoggingFilter log
INFO: 124 * Server has received a request on thread grizzly-http-server-3
124 > GET http://localhost:57645/lensapi/queryapi/queries/089e3330-e706-4401-b5ac-a9becedf2c10?sessionid=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22+standalone%3D%22yes%22%3F%3E%3ClensSessionHandle%3E%3CpublicId%3E6ee7bece-1bf2-4255-aeac-297cc6f797fe%3C%2FpublicId%3E%3CsecretId%3E5ff61db8-d9ee-4adf-bc7f-c4652008e811%3C%2FsecretId%3E%3C%2FlensSessionHandle%3E
Jul 27, 2016 5:47:37 AM org.glassfish.jersey.filter.LoggingFilter log
INFO: 124 * Server responded with a response on thread grizzly-http-server-3
124 < 200
124 < Content-Type: application/xml
Will reduce the timeout on test and update
Will reduce the timeout on test and update
Was wrong here. Need to update the setup to come to MockQueryExecutionServiceImpl. Will do.
Applied patch: LENS-1239.2.patch and ran command: mvn clean install -fae. Result: Failure. Build Job: https://builds.apache.org/job/PreCommit-Lens-Build/744/
Applied patch: LENS-1239.2.patch and ran command: mvn clean install -fae. Result: Failure. Build Job: https://builds.apache.org/job/PreCommit-Lens-Build/746/
Applied patch: LENS-1239.3.patch and ran command: mvn clean install -fae. Result: Success. Build Job: https://builds.apache.org/job/PreCommit-Lens-Build/747/
Applied patch: LENS-1239.3.patch and ran command: mvn clean install -fae. Result: Failure. Build Job: https://builds.apache.org/job/PreCommit-Lens-Build/748/
SUCCESS: Integrated in Lens-Commit-Java8 #217 (See https://builds.apache.org/job/Lens-Commit-Java8/217/)
LENS-1239 : Fix test failures because of restarts in test cases (rajatgupta59: rev fc3dc04acc1aff1154745fa5132cb975ac5fabb8)
- lens-server/src/test/java/org/apache/lens/server/query/TestDuplicateQueries.java
- lens-client/src/test/resources/lens-site.xml
- lens-server/src/test/java/org/apache/lens/server/session/TestSessionResource.java
- lens-server/src/test/java/org/apache/lens/server/query/TestQueryConstraints.java
- lens-server/src/test/java/org/apache/lens/server/LensServerTestUtil.java
- lens-server/src/test/java/org/apache/lens/server/LensJerseyTest.java
- lens-server/src/test/java/org/apache/lens/server/query/TestQueryIndependenceFromSessionClose.java
- lens-server/src/test/java/org/apache/lens/server/TestServerRestart.java
- lens-client/src/test/java/org/apache/lens/client/TestLensClient.java
- lens-server/src/main/java/org/apache/lens/server/query/QueryExecutionServiceImpl.java
UNSTABLE: Integrated in Lens-Commit #1305 (See https://builds.apache.org/job/Lens-Commit/1305/)
LENS-1239 : Fix test failures because of restarts in test cases (rajatgupta59: rev fc3dc04acc1aff1154745fa5132cb975ac5fabb8)
- lens-server/src/test/java/org/apache/lens/server/TestServerRestart.java
- lens-client/src/test/resources/lens-site.xml
- lens-server/src/main/java/org/apache/lens/server/query/QueryExecutionServiceImpl.java
- lens-client/src/test/java/org/apache/lens/client/TestLensClient.java
- lens-server/src/test/java/org/apache/lens/server/query/TestQueryConstraints.java
- lens-server/src/test/java/org/apache/lens/server/session/TestSessionResource.java
- lens-server/src/test/java/org/apache/lens/server/query/TestQueryIndependenceFromSessionClose.java
- lens-server/src/test/java/org/apache/lens/server/query/TestDuplicateQueries.java
- lens-server/src/test/java/org/apache/lens/server/LensJerseyTest.java
- lens-server/src/test/java/org/apache/lens/server/LensServerTestUtil.java
Failures are because server has come up only with hive drivers and no jdbc and mock failing drivers. LensJerseyTest.getServerConf() constructs conf with overwrites from subclasses. If subclasses over-write the conf - TestQueryIndependenceFromSessionClose does right now, and if BeforeSuite's setup picks conf from that class, we are seeing failures.
I'm updating the test classes with proper calls to restart with correct config. Will put up a review request with changes.
cc prongs puneet884 lavkesh