LadyForest commented on a change in pull request #14938:
URL: https://github.com/apache/flink/pull/14938#discussion_r575827407
##########
File path:
flink-table/flink-sql-client/src/test/java/org/apache/flink/table/client/gateway/local/ExecutionContextTest.java
##########
@@ -169,15 +172,33 @@ public void testDefaultExecutionConfig() throws Exception
{
conf.get(RestartStrategyOptions.RESTART_STRATEGY_FAILURE_RATE_DELAY));
}
+ @Test
+ public void testModulesWithDeprecatedType() throws Exception {
+ thrown.expect(SqlClientException.class);
+ thrown.expectMessage(
+ "Property 'type' is deprecated, please remove it and rename
module name "
+ + "'mymodule' to type name 'ModuleDependencyTest' and
try again");
+ final Map<String, String> moduleConf = new HashMap<>();
+ moduleConf.put(
+ "$VAR_MODULE_LIST",
+ "\n - name: mymodule\n type: " + "ModuleDependencyTest\n
test: test");
+ createModuleExecutionContext(moduleConf);
+ }
+
@Test
public void testModules() throws Exception {
- final ExecutionContext<?> context = createModuleExecutionContext();
+ final Map<String, String> moduleConf = new HashMap<>();
+ moduleConf.put(
+ "$VAR_MODULE_LIST",
+ "\n - name: core\n - name: ModuleDependencyTest\n "
+ + "test: test\n - name: hive\n hive-version:
2.3.4");
Review comment:
Hi Jark, I think we need to keep this test to verify both current and
new module configuration settings behave correctly if we decide to have this
feature for YAML. The test may have a better name such as
`testModulesWithOptionalTypeKey`. What do you think?
----------------------------------------------------------------
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]