Skip to content

Mockito mock falsely initialized as CGLIB proxy with AspectJ aspect #33113

@andrethiel1und1

Description

@andrethiel1und1

Affects: Framework 6.1.10 (most likely also 6.1.9)

Disclaimer: I have a hard time digging into this issue, because most of the concepts here are new to me. I might use the terminology wrong or be way off with my assessment.

We experienced a change with Framework 6.1.8 where AspectJ related Mockito tests started failing, most likely related to #32970
However, instead of being executed twice there were now 3 calls for one method.
Besides the actual delegate and the cglib proxy (as described in the issue) there was another call from a Mockito mock instance with a cglib proxy - at least I think that is what the debugger indicates: a call from MyService$MockitoMock$<somerandomstuff>$$SpringCGLIB$$0

Since we only manage the spring-boot version directly, we tested the backported fix (I think it is this one: 628b050) using framework version 6.1.10 (spring-boot update to 3.2.7).
The tests still fail because there are still two calls. The CTW cglib proxy call has been fixed, but there is still the Mockito mock related one.
At least that is what it looks like to me.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesstatus: feedback-providedFeedback has been providedtype: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions