Skip to content

Introduce dedicated AOT tests for bean override support in the TCF #32932

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

Closed
sbrannen opened this issue Jun 1, 2024 · 1 comment
Closed

Introduce dedicated AOT tests for bean override support in the TCF #32932

sbrannen opened this issue Jun 1, 2024 · 1 comment
Labels
in: test Issues in the test module status: duplicate A duplicate of another issue type: task A general task

Comments

@sbrannen
Copy link
Member

sbrannen commented Jun 1, 2024

Overview

As alluded to in #32925, it's possible to run AOT tests for bean override support in the Spring TestContext Framework (TCF) manually via the endToEndTestsForEntireSpringTestModule() and endToEndTestsForSelectedTestClasses() methods in AotIntegrationTests; however, that must be performed manually.

In order to ensure that tests using the new bean override support (@TestBean, @MockitoBean, and @MockitoSpyBean) run correctly in AOT mode, we need to introduce dedicated tests that are run with every build.

As a bare minimum, AotIntegrationTests.endToEndTests() must be modified to include test classes that utilize the basic features of @TestBean, @MockitoBean, and @MockitoSpyBean.

The test classes included could be existing ones from the org.springframework.test.context.bean.override.convention and org.springframework.test.context.bean.override.mockito packages, or we could create new, simplified test classes in org.springframework.test.context.aot.samples.bean.override.

Related Issues

@snicoll
Copy link
Member

snicoll commented Jun 1, 2024

We now have three issues for basically the same thing, that is asses how much of the bean overriding support are we going to be able to support with AOT. As part as assessing this, we will obviously write any missing tests.

@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2024
@snicoll snicoll removed this from the 6.2.x milestone Jun 1, 2024
@snicoll snicoll added the status: duplicate A duplicate of another issue label Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module status: duplicate A duplicate of another issue type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants