dawidwys commented on a change in pull request #9433: [FLINK-13708] 
[table-planner-blink] transformations should be cleared after execution in 
blink planner
URL: https://github.com/apache/flink/pull/9433#discussion_r346888523
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/api/TableEnvironmentITCase.scala
 ##########
 @@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.api
+
+import org.apache.flink.api.common.typeinfo.TypeInformation
+import org.apache.flink.api.common.typeinfo.Types.STRING
+import org.apache.flink.core.fs.FileSystem.WriteMode
+import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment
+import org.apache.flink.table.api.internal.TableEnvironmentImpl
+import org.apache.flink.table.api.scala.StreamTableEnvironment
+import org.apache.flink.table.planner.utils.{TableTestUtil, TestTableSources}
+import org.apache.flink.table.sinks.CsvTableSink
+import org.apache.flink.util.FileUtils
+
+import org.junit.Assert.{assertEquals, assertFalse, assertTrue}
+import org.junit.rules.TemporaryFolder
+import org.junit.{Rule, Test}
+
+import _root_.java.io.File
+
+
+class TableEnvironmentITCase {
 
 Review comment:
   We can use Junit's parameterized runner here to run all the tests for each 
mode separately.
   
   This approach is better as we immediately see which case failed and we can 
also debug each case separately. Now take the 
`testExecuteTwiceUsingSameTableEnvOnStream` method for example:
   ```
     @Test
     def testExecuteTwiceUsingSameTableEnvOnStream(): Unit = {
       // test TableEnvironment
       val settings = 
EnvironmentSettings.newInstance().useBlinkPlanner().inStreamingMode().build()
       testExecuteTwiceUsingSameTableEnv(TableEnvironmentImpl.create(settings))
   
       // test StreamTableEnvironment
       testExecuteTwiceUsingSameTableEnv(StreamTableEnvironment.create(
         StreamExecutionEnvironment.getExecutionEnvironment, settings))
     }
   ```
   If there is an error in `testExecuteTwiceUsingSameTableEnv` with batch 
planner the stream planner case will not be run. It is also not possible to 
debug the stream case without running the batch case.

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

Reply via email to