vvysotskyi 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_r310655963
##########
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 {
Review comment:
In most of the cases where this method is used, `cluster` from the parent
class is used, and its usage may be replaced with `queryBuilder()`, so please
remove this method and add corresponding changes to simplify tests.
----------------------------------------------------------------
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