You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Chris Westin (JIRA)" <ji...@apache.org> on 2015/03/26 22:05:53 UTC

[jira] [Commented] (DRILL-2579) JDBC unit tests will timeout after one testcase failed with unexpected results.

    [ https://issues.apache.org/jira/browse/DRILL-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14382670#comment-14382670 ] 

Chris Westin commented on DRILL-2579:
-------------------------------------

Reproduced by altering the expected result of the first test case in TestJdbcQuery that runs for me, which is testIntegerLiteral. After that, stepped into testQuery() inside testCharLiteral (the second test case that runs for me). Added a breakpoint to the Foreman constructor. The Foreman breakpoint is never reached when I step over s.executeQuery() in testQuery(). So I don't think the query request is even making it to the server.


> JDBC unit tests will timeout after one testcase failed with unexpected results.  
> ---------------------------------------------------------------------------------
>
>                 Key: DRILL-2579
>                 URL: https://issues.apache.org/jira/browse/DRILL-2579
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Tools, Build & Test
>            Reporter: Jinfeng Ni
>            Assignee: Chris Westin
>
> In unit testcase such as TestJdbcQuery, if there is one failing unit testcase  due to unexpected results, then the rest of unit test cases will hit timeout issue. See following stack trace:
> {code}
> java.lang.Exception: test timed out after 40000 milliseconds
> 	at sun.misc.Unsafe.park(Native Method)
> 	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
> 	at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
> 	at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:994)
> 	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1303)
> 	at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:236)
> 	at org.apache.drill.jdbc.DrillResultSet.execute(DrillResultSet.java:109)
> 	at org.apache.drill.jdbc.DrillResultSet.execute(DrillResultSet.java:49)
> 	at net.hydromatic.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:404)
> 	at net.hydromatic.avatica.AvaticaStatement.executeQueryInternal(AvaticaStatement.java:351)
> 	at net.hydromatic.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:78)
> 	at org.apache.drill.jdbc.test.JdbcAssert$TestDataConnection.returns(JdbcAssert.java:203)
> 	at org.apache.drill.jdbc.test.TestJdbcQuery.testCaseWith2ThensAndElse(TestJdbcQuery.java:302)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> 	at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
> {code}
> To re-produce this issue, simply intentionally modify the expected results for one originally successful unit testcase in TestJdbcQuery.java to make it fail with unexpected results. You will see the rest of unit test cases start timeout, after the failure.  
> Possible cause of this issue : the count down latch is not released, if the testcase is failling due to unexpected results.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)