Skip to content

Deprecate JUnit 4 support #4816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fmbenhassine opened this issue Apr 28, 2025 · 2 comments · May be fixed by #4835
Open

Deprecate JUnit 4 support #4816

fmbenhassine opened this issue Apr 28, 2025 · 2 comments · May be fixed by #4835

Comments

@fmbenhassine
Copy link
Contributor

Related to spring-projects/spring-framework#34794

@Coen90
Copy link

Coen90 commented May 1, 2025

@fmbenhassine I would like to assign this task.

@fmbenhassine
Copy link
Contributor Author

fmbenhassine commented May 6, 2025

@Coen90 Sure thank you for your offer to help!

I don't think there much to do here, except updating javadocs

* A typical usage of this annotation with JUnit 4 is like the following:
*
* <pre class="code">
* &#064;RunWith(SpringRunner.class)
* &#064;SpringBatchTest
* &#064;ContextConfiguration(classes = MyBatchJobConfiguration.class)
* public class MyBatchJobTests {
*
* &#064;Autowired
* private JobLauncherTestUtils jobLauncherTestUtils;
*
* &#064;Autowired
* private JobRepositoryTestUtils jobRepositoryTestUtils;
*
* &#064;Autowired
* private Job jobUnderTest;
*
* &#064;Before
* public void setup() {
* this.jobRepositoryTestUtils.removeJobExecutions();
* this.jobLauncherTestUtils.setJob(this.jobUnderTest); // this is optional if the job is unique
* }
*
* &#064;Test
* public void testMyJob() throws Exception {
* // given
* JobParameters jobParameters = this.jobLauncherTestUtils.getUniqueJobParameters();
*
* // when
* JobExecution jobExecution = this.jobLauncherTestUtils.launchJob(jobParameters);
*
* // then
* Assert.assertEquals(ExitStatus.COMPLETED, jobExecution.getExitStatus());
* }
*
* }
* </pre>
, (maybe somewhere else as well) and reference docs with a deprecation note.

@Coen90 Coen90 linked a pull request May 7, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants