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

   Currently 
[StreamsGroupDescribeRequestTest](https://github.com/apache/kafka/blob/85387e94364bdf31c6acf06086210d85a9fb0711/core/src/test/scala/unit/kafka/server/StreamsGroupDescribeRequestTest.scala#L32)
 includes accidental JUnit 4 assert usages. Based on my findings:
   
   - Historically 
[KAFKA-7339](https://issues.apache.org/jira/browse/KAFKA-7339) had the JUnit 4 
to JUnit 5 in scope.
   - [KAFKA-19153](https://issues.apache.org/jira/browse/KAFKA-19153) pulled in 
a new dependency [Mock OAuth2 
Server](https://mvnrepository.com/artifact/no.nav.security/mock-oauth2-server/2.3.0)
 which in turn depends on JUnit 4
   - [KAFKA-19754](https://issues.apache.org/jira/browse/KAFKA-19754) probably 
only used the JUnit 4 asserts by accident since the test library is on the test 
classpath
   
   As a fix I changed the asserts to the JUnit 5 equivalent and removed JUnit 4 
from the test compile classpath so we can avoid similar accidents in the future.
   
   Other things I considered:
   
   - JUnit 4 can't be excluded from [Mock OAuth2 
Server](https://mvnrepository.com/artifact/no.nav.security/mock-oauth2-server/2.3.0)
 as it is a runtime dependency which results in NoClassDefFoundError
   - Tried updating [Mock OAuth2 
Server](https://mvnrepository.com/artifact/no.nav.security/mock-oauth2-server/2.3.0)
 to latest version but it still pulls in JUnit 4


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