affo commented on code in PR #24471:
URL: https://github.com/apache/flink/pull/24471#discussion_r1543172250


##########
flink-end-to-end-tests/flink-batch-sql-test/src/test/java/org/apache/flink/sql/tests/BatchSQLTest.java:
##########
@@ -34,66 +35,105 @@
 import org.apache.flink.table.sinks.CsvTableSink;
 import org.apache.flink.table.sources.InputFormatTableSource;
 import org.apache.flink.table.types.DataType;
+import org.apache.flink.test.junit5.MiniClusterExtension;
+import org.apache.flink.test.resources.ResourceTestUtils;
 import org.apache.flink.types.Row;
+import org.apache.flink.util.TestLoggerExtension;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.EnumSource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.Serializable;
+import java.nio.file.Files;
+import java.nio.file.Path;
 import java.time.Instant;
 import java.time.LocalDateTime;
 import java.time.ZoneOffset;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
+import java.util.Optional;
+import java.util.UUID;
 
-/**
- * End-to-end test for batch SQL queries.
- *
- * <p>The sources are generated and bounded. The result is always constant.
- *
- * <p>Parameters: -outputPath output file path for CsvTableSink; -sqlStatement 
SQL statement that
- * will be executed as executeSql
- */
-public class BatchSQLTestProgram {
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+/** End-to-End tests for Batch SQL tests. */
+@ExtendWith(TestLoggerExtension.class)
+public class BatchSQLTest {
+    private static final Logger LOG = 
LoggerFactory.getLogger(BatchSQLTest.class);
+
+    private static final Path sqlPath =
+            ResourceTestUtils.getResource("resources/sql-job-query.sql");
+
+    @TempDir private Path tmp;
+
+    @RegisterExtension
+    private static final MiniClusterExtension MINI_CLUSTER =
+            new MiniClusterExtension(
+                    new MiniClusterResourceConfiguration.Builder()
+                            .setNumberTaskManagers(2)
+                            .setNumberSlotsPerTaskManager(1)
+                            .build());
+
+    private Path result;
+
+    @BeforeEach
+    public void before() {
+        this.result = tmp.resolve(String.format("result-%s", 
UUID.randomUUID()));
+        LOG.info("Results for this test will be stored at: {}", this.result);
+    }
+
+    @ParameterizedTest
+    @EnumSource(
+            value = BatchShuffleMode.class,
+            names = {
+                "ALL_EXCHANGES_BLOCKING",

Review Comment:
   Not an expert either, but I tried and I get an `IllegalState`:
   
   
   > At the moment, adaptive batch scheduler requires batch workloads to be 
executed with types of all edges being BLOCKING or 
HYBRID_FULL/HYBRID_SELECTIVE. To do that, you need to configure 
'execution.batch-shuffle-mode' to 'ALL_EXCHANGES_BLOCKING' or 
'ALL_EXCHANGES_HYBRID_FULL/ALL_EXCHANGES_HYBRID_SELECTIVE'. Note that for 
DataSet jobs which do not recognize the aforementioned shuffle mode, the 
ExecutionMode needs to be BATCH_FORCED to force BLOCKING shuffle



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

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to