Skip to content

A @SpyBean on the output of a FactoryBean is not reset #31204

@nightswimmings

Description

@nightswimmings

Repository SpyBeans seem to keep stubs when context is reused on other test class, since 2.6.x up to 2.7.0, at least

This does not seem to happen with regular beans (i.e, not JPA proxies Repository interfaces), and it seems caused by MockReset.get(bean) not returning AFTER in objectResetMocksTestExecutionListener.resetMocks, when it should. It returns NONE because SpringBootMockResolver does not find the target, apparently
test.zip
.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions