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

   In many parameterized tests, the display name is broken. Example - 
`testMetadataFetch` appears as `[1] true`, `[2] false`  
[link](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-14607/9/testReport/junit/org.apache.kafka.clients.producer/KafkaProducerTest/)
 
   This is because the constant in `@ParameterizedTest`
   ```java
   String DEFAULT_DISPLAY_NAME = "[{index}] {argumentsWithNames}";
   ```
   
   This PR adds a new `junit-platform.properties` which overrides to add a 
`{displayName}` which shows the `the display name of the method`
   
   For existing tests which override the name, should work as is. The 
precedence rules are explained
   
   > 1. `name` attribute in `@ParameterizedTest`, if present
   > 2. value of the `junit.jupiter.params.displayname.default` configuration 
parameter, if present
   > 3. `DEFAULT_DISPLAY_NAME` constant defined in `@ParameterizedTest`
   
   Source: 
https://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests-display-names
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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