efaracci018 opened a new pull request, #54073:
URL: https://github.com/apache/spark/pull/54073

   ### What changes were proposed in this pull request?
   
   Replace hardcoded filename with `File.createTempFile()` in 
`testReloadMissingTrustStore` to ensure the temporary `trustStore` file is 
created in the same filesystem as the test working directory.
   
   ### Why are the changes needed?
   
   This change fixes a unit test bug.
   
   JDK 21's `UnixFileSystem.move()` uses atomic rename operations that fail 
when moving files across different mounted filesystems. The test creates a 
temporary file in `/tmp` and attempts to move it to the current directory. When 
these locations are on different partitions, the atomic move fails with a 
`testmissing.jks: Cross-device link` error because the `rename()` system call 
cannot move files across different filesystems.
   
   The fix ensures both temporary and target files are created in the same 
filesystem by eliminating the cross-filesystem move operation.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Verified `ReloadingX509TrustManagerSuite` passes with both JDK 21 and JDK 17:
   
   `build/mvn -pl common/network-common -Dtest=ReloadingX509TrustManagerSuite 
test`
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to