wuchong commented on a change in pull request #14742:
URL: https://github.com/apache/flink/pull/14742#discussion_r563486211
##########
File path:
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/api/TableEnvironmentTest.scala
##########
@@ -106,10 +107,23 @@ class TableEnvironmentTest {
@Test
def testStreamTableEnvironmentExecutionExplain(): Unit = {
val execEnv = StreamExecutionEnvironment.getExecutionEnvironment
- execEnv.setParallelism(1)
+ execEnv.setParallelism(4)
val settings = EnvironmentSettings.newInstance().inStreamingMode().build()
- val tEnv = StreamTableEnvironment.create(execEnv, settings)
+ var tEnv = StreamTableEnvironment.create(execEnv, settings)
+
+ testStreamTableEnvironmentExecutionExplain(tEnv)
+
+ tEnv = StreamTableEnvironment.create(
+ StreamExecutionEnvironment.getExecutionEnvironment,
+ settings)
+ val conf = new Configuration()
+ conf.setInteger("parallelism.default", 4)
+ tEnv.getConfig.addConfiguration(conf)
+
+ testStreamTableEnvironmentExecutionExplain(tEnv)
+ }
+ def testStreamTableEnvironmentExecutionExplain(tEnv: TableEnvironment): Unit
= {
Review comment:
Add `private` modifier and the method name would be better not start
with `test` prefix, e.g. `verifyExplainExecutionPlan(tEnv)`.
##########
File path:
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/api/TableEnvironmentTest.scala
##########
@@ -106,10 +107,23 @@ class TableEnvironmentTest {
@Test
def testStreamTableEnvironmentExecutionExplain(): Unit = {
val execEnv = StreamExecutionEnvironment.getExecutionEnvironment
- execEnv.setParallelism(1)
+ execEnv.setParallelism(4)
val settings = EnvironmentSettings.newInstance().inStreamingMode().build()
- val tEnv = StreamTableEnvironment.create(execEnv, settings)
+ var tEnv = StreamTableEnvironment.create(execEnv, settings)
+
+ testStreamTableEnvironmentExecutionExplain(tEnv)
+
+ tEnv = StreamTableEnvironment.create(
+ StreamExecutionEnvironment.getExecutionEnvironment,
+ settings)
+ val conf = new Configuration()
+ conf.setInteger("parallelism.default", 4)
+ tEnv.getConfig.addConfiguration(conf)
+
+ testStreamTableEnvironmentExecutionExplain(tEnv)
Review comment:
I would like to separate them into different methods, then the failed
message will be more clear to help find which is failed.
For example, we can have `testExplainExecutionPlanWithEnvParallelism` and
`testExplainExecutionPlanWithConfParallelism`.
----------------------------------------------------------------
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]