Skip to content

Conversation

@ramzeta
Copy link

@ramzeta ramzeta commented Nov 23, 2025

Closes #47228

Summary

This PR removes outdated JUnit 4 usage instructions from javadoc comments in all test slice annotations.

Changes

Removed the following paragraph from 18 test annotation classes:

When using JUnit 4, this annotation should be used in combination with @RunWith(SpringRunner.class). 

These annotations now only work with JUnit 5 (Jupiter) via @ExtendWith(SpringExtension.class), making the JUnit 4 instructions obsolete and potentially confusing for users.

Affected Annotations

  • @DataCassandraTest
  • @DataCouchbaseTest
  • @DataElasticsearchTest
  • @DataJdbcTest
  • @DataJpaTest
  • @DataLdapTest
  • @DataMongoTest
  • @DataNeo4jTest
  • @DataR2dbcTest
  • @DataRedisTest
  • @JdbcTest
  • @JooqTest
  • @JsonTest
  • @RestClientTest
  • @WebClientTest
  • @WebFluxTest
  • @WebMvcTest
  • @WebServiceClientTest
Remove outdated JUnit 4 usage instructions from javadoc comments in all test slice annotations (@DataJpaTest, @WebMvcTest, etc.). These annotations now only work with JUnit 5 (Jupiter) via @ExtendWith(SpringExtension.class), making the JUnit 4 instructions obsolete and potentially confusing for users. See spring-projectsgh-47228 Signed-off-by: ramzeta <ramzeta@users.noreply.github.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 23, 2025
@philwebb philwebb added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 24, 2025
@philwebb philwebb added this to the 4.0.x milestone Nov 24, 2025
@snicoll
Copy link
Member

snicoll commented Nov 24, 2025

Thanks for the PR @ramzeta but the work is already done. As shown in the original issue it was reverted but will be reapplied when we decide in which milestone we want to merge this.

@snicoll snicoll closed this Nov 24, 2025
@snicoll snicoll added status: declined A suggestion or change that we don't feel we should currently apply and removed type: documentation A documentation update labels Nov 24, 2025
@wilkinsona wilkinsona removed this from the 4.0.x milestone Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: declined A suggestion or change that we don't feel we should currently apply

5 participants