-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
Report produced by ConditionReportApplicationContextFailureProcessor is always empty in a failed test #42185
Comments
I don't think this feature has ever worked. We had a problem in 2.x where #31793 started using the new failure processor SPI. Unfortunately, as Dave's noted above, it doesn't work. By the time |
It's Framework that creates and calls the processor instances so I think both of these are out of our control. We can't make Framework call them any earlier and implementing an additional callback won't help as Framework won't call it. @sbrannen I'm not sure how we missed this originally, but it appears that the |
Maybe |
Oh. That is indeed very unfortunate.
When/where exactly do you need such a hook/callback to capture the required state -- something before or within |
It would have to be within |
That's what I feared.
Yep, that's my gut feeling as well. The So, it sounds like changes to Though, perhaps @jhoeller has some ideas? |
I have a possible fix for this, but I'm not sure it's worth it as I'm not sure that I like the feature that it fixes. Running
There are two things I don't particularly like about it:
I'm not sure how to fix 1. 2 could perhaps be fixed by setting the log level of |
We're happy enough with 1 as we think the verbose output is better than no output, and definitely better than the current output that's incorrect. 2 is a minor detail and we don't feel that it has to be resolved for this to be worth fixing. |
There are no outcomes because the report on the context that failed was already discarded by Spring since it was a singleton bean instance. To reproduce just look at any failed
@SpringBootTest
where the context refresh fails and look for the empty condition evaluation report on stderr:The text was updated successfully, but these errors were encountered: