jnh5y commented on code in PR #23869:
URL: https://github.com/apache/flink/pull/23869#discussion_r1415682052


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/testutils/RestoreTestBase.java:
##########
@@ -117,6 +122,11 @@ public EnumSet<TestKind> supportedRunSteps() {
         return EnumSet.of(TestKind.SQL);
     }
 
+    @BeforeEach
+    public void clearData() {

Review Comment:
   >A food for thought. Would it make sense to add some unique identifier to 
all the sinks/sources in RestoreTestBase? We could use e.g. the test id or 
generate some UUID for the duration of a test run.
   
   I thought about trying to do that.  Seems like we'd have to do it manually 
in the test cases or update the SQL somehow if we were doing it in the code.  I 
didn't see an easy way to sort that out.



##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/testutils/RestoreTestBase.java:
##########
@@ -117,6 +122,11 @@ public EnumSet<TestKind> supportedRunSteps() {
         return EnumSet.of(TestKind.SQL);
     }
 
+    @BeforeEach
+    public void clearData() {

Review Comment:
   >Nice find!
   
   Thanks!
   
   > I think we should be unified with how it's done at other places. 
JsonPlanTestBase does it in AfterEach. If we reuse a name between those two, 
JsonPlanTestBase can fail if executed after RestoreTestBase.
   
   Likewise; good catch!  I've updated it to use the AfterEach annotation.  I 
like that.
   
   >Could we also clear the localRawResultsObservers here?
   
   Makes sense.  This also covers clearing any observers configured during the 
restoreTest stage.  Pushing that change...



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