Skip to content
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

Introduce missing tests for Bean Override features #33742

Open
5 of 7 tasks
sbrannen opened this issue Oct 18, 2024 · 0 comments
Open
5 of 7 tasks

Introduce missing tests for Bean Override features #33742

sbrannen opened this issue Oct 18, 2024 · 0 comments
Assignees
Labels
in: test Issues in the test module type: task A general task
Milestone

Comments

@sbrannen
Copy link
Member

sbrannen commented Oct 18, 2024

Overview

Over the past few weeks it has become apparent that our test suite does not fully cover all features of the Bean Override support in the TestContext framework.

To remedy that, we should introduce tests to cover corner cases and features that are currently not tested. As a starting point, we can adopt several of the tests for @MockBean and @SpyBean from Spring Boot's test suite.

Features to Test

The following is a list of features we should make sure we test before Spring Framework 6.2 GA.

  • Combining SpringExtension and MockitoExtension on the same test class, including support for @Captor combined with @MockitoSpyBean.
  • Support for @MockitoBean and @MockitoSpyBean when @ContextHierarchy is used.
  • @MockitoBean replacement of a bean with @Async methods.
  • @MockitoBean replacement of a scoped proxy.
  • @MockitoBean replacement of a Spring AOP proxy.
  • Spring AOP proxy that wraps a Mockito spy created via @MockitoSpyBean.
  • Mock reset support for beans within the ApplicationContext configured via MockReset.before() and MockReset.after().

Related Issues

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 type: task A general task
Projects
None yet
Development

No branches or pull requests

1 participant