KhyatiVaghamshi opened a new pull request, #23280: URL: https://github.com/apache/kafka/pull/23280
## Summary Replace `File.createTempFile()` with JUnit 5 `@TempDir` annotation in two Connect test files: - `FileStreamSourceTaskTest.java` (connect/file module) - `FileOffsetBackingStoreTest.java` (connect/runtime module) This removes the need for manual `@AfterEach` cleanup methods as JUnit 5 handles temporary directory lifecycle automatically. ## Changes - Added `@TempDir private Path tempDir` field to both test classes - Replaced `File.createTempFile(...)` with `Files.createFile(tempDir.resolve(...)).toFile()` - Removed `@AfterEach teardown()` methods that manually deleted temp files ## Scope This is a scoped PR covering 2 files as suggested in the JIRA ticket comments. Additional files can be migrated in follow-up PRs. ## Test plan - [x] `FileStreamSourceTaskTest` - all tests pass - [x] `FileOffsetBackingStoreTest` - all tests pass - [x] Verified locally with `./gradlew connect:file:test --tests FileStreamSourceTaskTest` - [x] Verified locally with `./gradlew connect:runtime:test --tests FileOffsetBackingStoreTest` -- 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]
