You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Gabor Liptak (JIRA)" <ji...@apache.org> on 2015/10/10 00:11:05 UTC

[jira] [Commented] (LENS-615) Refactoring of testQueryCommands test case

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

Gabor Liptak commented on LENS-615:
-----------------------------------

I published to RB as

https://reviews.apache.org/r/39191/

(The link on the right side doesn't get there ...)

> Refactoring of testQueryCommands test case
> ------------------------------------------
>
>                 Key: LENS-615
>                 URL: https://issues.apache.org/jira/browse/LENS-615
>             Project: Apache Lens
>          Issue Type: Improvement
>            Reporter: Himanshu Gahlaut
>            Assignee: Gabor Liptak
>              Labels: newbie
>
> There are too many test cases running in testQueryCommands test case. It is considerably time consuming to debug a failing test case within  testQueryCommands. If these test cases are modularized and broken into separate test cases, it will be much helpful in faster debugging.
> {code}
> @Test
>   public void testQueryCommands() throws Exception {
>     client = new LensClient();
>     client.setConnectionParam("lens.query.enable.persistent.resultset.indriver", "false");
>     setup(client);
>     LensQueryCommands qCom = new LensQueryCommands();
>     qCom.setClient(client);
>     resDir = new File("target/results");
>     assertTrue(resDir.exists() || resDir.mkdirs());
>     testExecuteSyncQuery(qCom);
>     testExecuteAsyncQuery(qCom);
>     testSyncResults(qCom);
>     testExplainQuery(qCom);
>     testExplainFailQuery(qCom);
>     testPreparedQuery(qCom);
>     testShowPersistentResultSet(qCom);
>     testPurgedFinishedResultSet(qCom);
>     testFailPreparedQuery(qCom);
>     // run all query commands with query metrics enabled.
>     client = new LensClient();
>     client.setConnectionParam("lens.query.enable.persistent.resultset.indriver", "false");
>     client.setConnectionParam("lens.query.enable.metrics.per.query", "true");
>     qCom.setClient(client);
>     String result = qCom.getAllPreparedQueries("all", "", -1, -1);
>     assertEquals(result, "No prepared queries");
>     testExecuteSyncQuery(qCom);
>     testExecuteAsyncQuery(qCom);
>     testSyncResults(qCom);
>     testExplainQuery(qCom);
>     testExplainFailQuery(qCom);
>     testPreparedQuery(qCom);
>     testShowPersistentResultSet(qCom);
>     testPurgedFinishedResultSet(qCom);
>     testFailPreparedQuery(qCom);
>   }
> {code}



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