snuyanzin commented on code in PR #27294:
URL: https://github.com/apache/flink/pull/27294#discussion_r2580260604


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/TransformationsTest.java:
##########
@@ -143,19 +153,135 @@ public void testLegacyBatchValues() {
 
     @Test
     public void testUidGeneration() {
-        checkUids(c -> c.set(TABLE_EXEC_UID_GENERATION, PLAN_ONLY), true, 
false);
-        checkUids(c -> c.set(TABLE_EXEC_UID_GENERATION, ALWAYS), true, true);
-        checkUids(c -> c.set(TABLE_EXEC_UID_GENERATION, DISABLED), false, 
false);
+        testUidGeneration(c -> c.set(TABLE_EXEC_UID_GENERATION, PLAN_ONLY), 
true, false);
+        testUidGeneration(c -> c.set(TABLE_EXEC_UID_GENERATION, ALWAYS), true, 
true);
+        testUidGeneration(c -> c.set(TABLE_EXEC_UID_GENERATION, DISABLED), 
false, false);
     }
 
-    private static void checkUids(
+    @Test
+    public void testUidDefaults() throws IOException {
+        assertTransformations(
+                config -> {},
+                json -> {},
+                env -> planFromCurrentFlinkValues(env).asJsonString(),
+                "\\d+_sink",
+                "\\d+_constraint-validator",
+                "\\d+_values");
+    }
+
+    @Test
+    public void testUidFlink1_15() throws IOException {
+        assertTransformations(
+                config ->
+                        config.set(TABLE_EXEC_UID_FORMAT, 
"<id>_<type>_<version>_<transformation>"),
+                json -> {},
+                env -> planFromFlink1_15Values(env).asJsonString(),
+                "\\d+_stream-exec-sink_1_sink",
+                "\\d+_stream-exec-sink_1_constraint-validator",
+                "\\d+_stream-exec-values_1_values");
+    }
+
+    @Test
+    public void testUidFlink1_18() throws IOException {
+        assertTransformations(
+                config ->
+                        config.set(TABLE_EXEC_UID_FORMAT, 
"<id>_<type>_<version>_<transformation>"),
+                json -> {},
+                env -> planFromCurrentFlinkValues(env).asJsonString(),
+                "\\d+_stream-exec-sink_1_sink",
+                "\\d+_stream-exec-sink_1_constraint-validator",
+                "\\d+_stream-exec-values_1_values");
+    }
+
+    @Test
+    public void testPerNodeCustomUid() throws IOException {

Review Comment:
   ```suggestion
       void testPerNodeCustomUid() throws IOException {
   ```
   nit: no need for `public` modifier for junit5



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to