You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/09/06 14:01:06 UTC

[GitHub] [kafka] divijvaidya opened a new pull request, #12591: MINOR: Replace usage of File.createTempFile() with TestUtils.tempFile()

divijvaidya opened a new pull request, #12591:
URL: https://github.com/apache/kafka/pull/12591

   **Why**
   Current set of integration tests leak files in the `/tmp` directory which makes it cumbersome if you don't restart the machine often.
   
   **Fix**
   Replace the usage of `File.createTempFile` with existing `TestUtils.tempFile` method across the test files. `TestUtils.tempFile` automatically performs a clean up of the temp files generated in `/tmp/` folder.
   
   **Testing**
   `./gradlew integrationTest` and `./gradlew unitTest` is successful locally.


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] showuon commented on pull request #12591: MINOR: Replace usage of File.createTempFile() with TestUtils.tempFile()

Posted by GitBox <gi...@apache.org>.
showuon commented on PR #12591:
URL: https://github.com/apache/kafka/pull/12591#issuecomment-1244750774

   Failed tests are unrelated
   ```
       Build / JDK 8 and Scala 2.12 / kafka.api.TransactionsTest.testBumpTransactionalEpoch(String).quorum=kraft
       Build / JDK 8 and Scala 2.12 / kafka.network.ConnectionQuotasTest.testListenerConnectionRateLimitWhenActualRateAboveLimit()
       Build / JDK 8 and Scala 2.12 / kafka.test.ClusterTestExtensionsTest.[1] Type=ZK, Name=Generated Test, MetadataVersion=3.3-IV3, Security=PLAINTEXT
       Build / JDK 17 and Scala 2.13 / org.apache.kafka.clients.consumer.CooperativeStickyAssignorTest.testLargeAssignmentAndGroupWithNonEqualSubscription()
       Build / JDK 17 and Scala 2.13 / org.apache.kafka.clients.consumer.StickyAssignorTest.testLargeAssignmentAndGroupWithNonEqualSubscription()
       Build / JDK 17 and Scala 2.13 / org.apache.kafka.common.security.authenticator.SaslAuthenticatorFailurePositiveDelayTest.testInvalidPasswordSaslPlain()
       Build / JDK 17 and Scala 2.13 / kafka.api.ProducerIdExpirationTest.testProducerIdExpirationWithNoTransactions(String).quorum=kraft
   ```


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] divijvaidya commented on pull request #12591: MINOR: Replace usage of File.createTempFile() with TestUtils.tempFile()

Posted by GitBox <gi...@apache.org>.
divijvaidya commented on PR #12591:
URL: https://github.com/apache/kafka/pull/12591#issuecomment-1243849390

   Thank you both for your review.
   
   Since, we agree up to pick up this incremental change, I am assuming no action is required from my side before you approve & merge?
   
   Note that the test failures are unrelated and I was able to test them successfully on local machine.


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] ijuma commented on pull request #12591: MINOR: Replace usage of File.createTempFile() with TestUtils.tempFile()

Posted by GitBox <gi...@apache.org>.
ijuma commented on PR #12591:
URL: https://github.com/apache/kafka/pull/12591#issuecomment-1243001431

   I think this incremental improvement is probably fine on its own. To improve things further, we should consider something like https://www.baeldung.com/junit-5-temporary-directory


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] showuon commented on pull request #12591: MINOR: Replace usage of File.createTempFile() with TestUtils.tempFile()

Posted by GitBox <gi...@apache.org>.
showuon commented on PR #12591:
URL: https://github.com/apache/kafka/pull/12591#issuecomment-1243088692

   > I think this incremental improvement is probably fine on its own. To improve things further, we should consider something like https://www.baeldung.com/junit-5-temporary-directory (versus polluting @AfterEach for each test that involves certs, etc.)
   
   Very cool! [KAFKA-14218](https://issues.apache.org/jira/browse/KAFKA-14218) is created for this improvement. 


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] showuon merged pull request #12591: MINOR: Replace usage of File.createTempFile() with TestUtils.tempFile()

Posted by GitBox <gi...@apache.org>.
showuon merged PR #12591:
URL: https://github.com/apache/kafka/pull/12591


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org