agozhiy commented on a change in pull request #1833: DRILL-6961: Handle
exceptions during queries to information_schema
URL: https://github.com/apache/drill/pull/1833#discussion_r311017316
##########
File path:
contrib/storage-opentsdb/src/test/java/org/apache/drill/store/openTSDB/TestOpenTSDBPlugin.java
##########
@@ -185,4 +190,46 @@ public void testDescribe() throws Exception {
test("describe `warp.speed.test`");
Assert.assertEquals(1, testSql("show tables"));
}
+
+ @Test
+ public void testInformationSchemaWrongPluginConfig() throws Exception {
+ ClusterFixture cluster = ClusterFixture.bareBuilder(dirTestWatcher)
+ .build();
+ int portNumber = QueryTestUtil.getFreePortNumber(10_000, 200);
+ final StoragePluginRegistry pluginRegistry =
cluster.drillbit().getContext().getStorage();
+ OpenTSDBStoragePluginConfig storagePluginConfig =
+ new OpenTSDBStoragePluginConfig(String.format("http://localhost:%s/",
portNumber));
+ storagePluginConfig.setEnabled(true);
+ pluginRegistry.createOrUpdate(OpenTSDBStoragePluginConfig.NAME,
storagePluginConfig, true);
+ test("select * from information_schema.`views`", cluster);
+ }
+
+ private void test(String query) throws Exception {
+ test(query, cluster);
+ }
+
+ private void test(String query, ClusterFixture cluster) throws Exception {
+ cluster.clientFixture().runQueriesAndLog(query);
+ }
+
+ private int testSql(String query) throws Exception {
+ return (int) cluster.clientFixture()
+ .queryBuilder()
+ .sql(query)
+ .print();
Review comment:
Done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services