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/06/17 21:16:01 UTC
[jira] [Created] (LENS-615) Refactoring of testQueryCommands test
case
Himanshu Gahlaut created LENS-615:
-------------------------------------
Summary: 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
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.
@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);
}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)