[
https://issues.apache.org/jira/browse/LENS-615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gabor Liptak updated LENS-615:
------------------------------
Attachment: LENS-615.1.patch
WIP
> 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
> Labels: newbie
> Attachments: LENS-615.1.patch
>
>
> 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)