flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] xuefuz commented on a change in pull request #8541: [FLINK-9172][sql-client] Support catalogs in SQL-Client yaml config file
Date Tue, 28 May 2019 03:26:25 GMT
xuefuz commented on a change in pull request #8541: [FLINK-9172][sql-client] Support catalogs
in SQL-Client yaml config file
URL: https://github.com/apache/flink/pull/8541#discussion_r287918350
 
 

 ##########
 File path: flink-table/flink-sql-client/src/test/java/org/apache/flink/table/client/gateway/local/EnvironmentTest.java
 ##########
 @@ -70,4 +79,24 @@ public void testMerging() throws Exception {
 		assertTrue(merged.getExecution().isStreamingExecution());
 		assertEquals(16, merged.getExecution().getMaxParallelism());
 	}
+
+	@Test
+	public void testDuplicateCatalog() {
+		exception.expect(SqlClientException.class);
+		exception.expectMessage("Cannot create catalog 'catalog2' because a catalog with this name
is already registered.");
+		Environment env = new Environment();
+		env.setCatalogs(Arrays.asList(
+			getCatalog("catalog1", "test"),
+			getCatalog("catalog2", "test"),
+			getCatalog("catalog2", "test")));
+	}
+
+	private static Map<String, Object> getCatalog(String name, String type) {
 
 Review comment:
   rename to createCatalog or instantiateCatalog?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message