You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Himanshu Gahlaut (JIRA)" <ji...@apache.org> on 2015/07/20 17:29:05 UTC

[jira] [Created] (LENS-677) Test cases which will cause intermittent failures

Himanshu Gahlaut created LENS-677:
-------------------------------------

             Summary: Test cases which will cause intermittent failures 
                 Key: LENS-677
                 URL: https://issues.apache.org/jira/browse/LENS-677
             Project: Apache Lens
          Issue Type: Bug
            Reporter: Himanshu Gahlaut


TestQueryService#testExecuteAsync:

Below asserts in this test case will fail, if status poller thread removes queries from launched queries OR if query submitter removes queries from queued queries, before the thread running test case could gauge the values via metricsSvc.

{code}
case RUNNING:
        assertEquals(metricsSvc.getRunningQueries(), runningQueries + 1,
          "Asserting queries for " + lensQuery.getQueryHandle());
        break;
      case QUEUED:
        assertEquals(metricsSvc.getQueuedQueries(), queuedQueries + 1);
{code}

TestQueryService#testExecuteAsync:

Below asserts will fail, if the query context is removed by QueryPurger thread before the test running test case could retrieve it from allQueries collection using queryService.

{code}

QueryContext ctx =    queryService.getQueryContext(lensQuery.getQueryHandle());
assertNotNull(ctx.getPhase1RewrittenQuery());
assertEquals(ctx.getPhase1RewrittenQuery(), ctx.getUserQuery()); 
   
{code}

These test cases have to be rewritten.



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