wuchong commented on a change in pull request #14938:
URL: https://github.com/apache/flink/pull/14938#discussion_r575832556



##########
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:
       Yes. Then I would suggest to improve the code format for readability, 
for example. 
   
   ```java
           moduleConf.put(
                   "$VAR_MODULE_LIST",
                   "\n  - name: core\n"
                           + "  - name: ModuleDependencyTest\n"
                           + "    test: test\n"
                           + "  - name: hive\n"
                           + "    hive-version: 2.3.4");
   ```




----------------------------------------------------------------
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]


Reply via email to