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

ASF GitHub Bot commented on DRILL-6788:
---------------------------------------

sohami closed pull request #1499: DRILL-6788: Intermittent unit test failure 
TestDrillbitResilience.fai…
URL: https://github.com/apache/drill/pull/1499
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/server/TestDrillbitResilience.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/server/TestDrillbitResilience.java
index 9f772e4d81b..c3238cafee0 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/server/TestDrillbitResilience.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/server/TestDrillbitResilience.java
@@ -742,8 +742,10 @@ public void failsWhenParsing() {
 
     final String exceptionDesc = "sql-parsing";
     final Class<? extends Throwable> exceptionClass = 
ForemanSetupException.class;
+    // Inject the failure twice since there can be retry after first failure 
introduced in DRILL-6762. Retry is because
+    // of version mismatch in local and remote function registry which syncs 
up lazily.
     final String controls = Controls.newBuilder()
-    .addException(DrillSqlWorker.class, exceptionDesc, exceptionClass)
+      .addException(DrillSqlWorker.class, exceptionDesc, exceptionClass, 0, 2)
       .build();
     assertFailsWithException(controls, exceptionClass, exceptionDesc);
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Intermittent unit test failure TestDrillbitResilience.failsWhenParsing: Query 
> state should be FAILED (and not COMPLETED)
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-6788
>                 URL: https://issues.apache.org/jira/browse/DRILL-6788
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Tools, Build &amp; Test
>    Affects Versions: 1.15.0
>            Reporter: Sorabh Hamirwasia
>            Assignee: Sorabh Hamirwasia
>            Priority: Major
>              Labels: ready-to-commit
>             Fix For: 1.15.0
>
>
> I am seeing a unit test failing for me consistently on master. On further 
> debugging I think the root cause is because of a change done as part of below 
> commit for DRILL-6762.
> [https://github.com/apache/drill/commit/2bd26ffe34108f876184c63188122f2d49db4c4a]
>  
> *Failing Test:*
> {code:java}
> 13:35:30.914 [main] ERROR org.apache.drill.TestReporter - Test Failed (d: 0 
> B(65.0 KiB), h: 33.0 MiB(2.2 GiB), nh: 56.3 KiB(304.1 MiB)): 
> failsWhenParsing(org.apache.drill.exec.server.TestDrillbitResilience) 
> java.lang.AssertionError: Query state should be FAILED (and not COMPLETED). 
> at 
> org.apache.drill.exec.server.TestDrillbitResilience.assertFailsWithException(TestDrillbitResilience.java:730)
>  ~[test-classes/:na] at 
> org.apache.drill.exec.server.TestDrillbitResilience.assertFailsWithException(TestDrillbitResilience.java:736)
>  ~[test-classes/:na] at 
> org.apache.drill.exec.server.TestDrillbitResilience.failsWhenParsing(TestDrillbitResilience.java:748)
>  ~[test-classes/:na] at java.lang.Thread.run(Thread.java:748) 
> ~[na:1.8.0_161]{code}
>  
>   
> TestDrillbitResilience.failsWhenParsing:748->assertFailsWithException:736->assertFailsWithException:730
>  Query state should be FAILED (and not COMPLETED).
>  
> *Root Cause:*
> The test basically set's up an injection to be triggered during parsing and 
> only throw checked exception once. With [this new 
> change|https://github.com/apache/drill/commit/2bd26ffe34108f876184c63188122f2d49db4c4a#diff-e67ba82ec2fbb8bc15eed30ec6a5379cR82]
>  it catches the throw'd exception and retries. Since the injector has already 
> thrown the exception before upon retry it doesn't inject another exception 
> and the query is fine.
>  
> *Fix:*
> We can fix this by increasing the number of throws by injector to 2 instead 
> of 1 so upon retry the exception will be thrown again. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to