Dennis-Mircea commented on code in PR #1119:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/1119#discussion_r3301846299


##########
flink-kubernetes-operator/src/test/java/org/apache/flink/kubernetes/operator/utils/FlinkUtilsZookeeperHATest.java:
##########
@@ -69,11 +72,8 @@ public void setupZookeeper() throws Exception {
                 HighAvailabilityOptions.HA_MODE, 
HighAvailabilityMode.ZOOKEEPER.toString());
         configuration.setString(
                 HighAvailabilityOptions.HA_ZOOKEEPER_QUORUM, 
testingServer.getConnectString());
-        temporaryFolder = new TemporaryFolder();
-        temporaryFolder.create();
         configuration.setString(
-                HighAvailabilityOptions.HA_STORAGE_PATH,
-                temporaryFolder.newFolder().getAbsolutePath());
+                HighAvailabilityOptions.HA_STORAGE_PATH, 
temporaryFolder.getAbsolutePath());

Review Comment:
   The `@TempDir` swap changes the path semantics, worth flagging:
   
   - Before: `temporaryFolder.newFolder().getAbsolutePath()` set 
`HA_STORAGE_PATH` to a fresh **subfolder** inside the temp dir.
   - After: `temporaryFolder.getAbsolutePath()` sets it to the **temp dir 
itself**.
   
   For ZooKeeper HA both are fine (any writable directory works), but it is a 
silent behavior change rather than a strict migration. If you want exact 
equivalence, the idiomatic form is:
   
   ```suggestion
                   HighAvailabilityOptions.HA_STORAGE_PATH,
                   temporaryFolder.resolve("ha").toAbsolutePath().toString());
   ```



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