Most Bulkhead tests use invalid CDI beans
See original GitHub issueMost of the bulkhead tests are using invalid CDI beans. Here are some examples:
Where as there are other valid beans:
The problem is that the tests use an empty beans.xml
file, which works differently in CDI SE and Java EE. In Java EE these are valid beans because of the default discovery behavior. However, its not required to work in SE mode.
Ideally, each of these test clients would have a scope applied to them to make them discovered.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Mocking CDI beans in Quarkus
This is due to the fact that beans that are annotated with @Mock are normal CDI beans (and are therefore used throughout the...
Read more >Enhanced CDI Contexts and Bulkheads With MicroProfile ...
Let's create and use a request-scoped bean that is being used during the handling of a request. With plain CDI, we would not...
Read more >Testing CDI Beans and the Persistence Layer Under Java SE
That way you can test CDI beans (e.g. containing business logic) in conjunction with the persistence layer (e.g. JPA-based repositories) ...
Read more >CDI Bean injection inside Mocked Beans does not seem to ...
Actual behavior. CDI beans inside an injected Mock/Spy Bean are all null. How to Reproduce? See my reproducer project run the tests inside ......
Read more >Eclipse MicroProfile Fault Tolerance
Apply Fault Tolerance annotations on the CDI bean classes or methods. ... When @Bulkhead is used with @Asynchronous, the thread pool isolation approach...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, @Emily-Jiang
I already made the change related to the @johnament comments regarding the CDI injection.
Please check and let me know if is something else needed.
Thank you
@johnament please check to see whether the fix is sufficient. Close for now. Please reopen if you hit any problems.