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

Arbitrary bean wrapping does not work for Spring Data JPA #319

Open
jonatan-ivanov opened this issue Jun 1, 2022 · 2 comments
Open

Arbitrary bean wrapping does not work for Spring Data JPA #319

jonatan-ivanov opened this issue Jun 1, 2022 · 2 comments
Labels

Comments

@jonatan-ivanov
Copy link

If I create a Spring Data Repository (e.g.: public interface AbcRepository extends PagingAndSortingRepository<Abc, UUID>), and set chaos.monkey.watcher.beans (i.e.: abcRepository), it seems ChaosMonkeyBeanPostProcessor does not wrap the bean properly (the proxy is the same as the original bean according to the debugger).

Expected Behavior

Setting chaos.monkey.watcher.beans on Spring Data's Repository bean should result in wrapping the bean.

Current Behavior

The bean is not wrapped.

Possible Solution

I did not dig that deep, so no idea at the moment.

Steps to Reproduce

I have a reproducer here but chaos-monkey needs to be enabled and chaos.monkey.watcher.beans set.

Context (Environment)

Spring Boot 2.7.0
Temurin-18+36 (build 18+36)

@F43nd1r F43nd1r added the bug label Jun 3, 2022
@F43nd1r
Copy link
Member

F43nd1r commented Jun 3, 2022

As this also works in a simpler project, I'm going to assume this is the same issue as #317

@jonatan-ivanov
Copy link
Author

jonatan-ivanov commented Jun 4, 2022

Might be, please check my minimal reproducer I posted on #317 if I try to assault the repo through the bean it does not work.
I'm able to repro this behavior with the reproducer in #317 and adding chaos.monkey.watcher.beans=helloRepository to the settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants