-
Notifications
You must be signed in to change notification settings - Fork 2.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
NPE in QuarkusTestExtension after exception in QuarkusTestResourceLifecycleManager.start()
#33371
Comments
Present more useful exception when QuarkusTestResourceLifecycleManager fails
That NPE still pops up in 3.1.2.Final, reopening... |
Running into the same issue with 3.2.2.Final. |
Same issue? Just throwing an exception in a test resource causes the NPE? |
Hey @geoand! Wow, what a quick response, on a Saturday nonetheless! So I'm getting the exact same NPE as above, which as I understand is only a follow-up issue to another error. The root cause in my case is this:
I've seen other reports for that (#14348) and you seemed to have it closed in 2021, but somehow it still seems to be a problem. Intermittently, that is. Here's the commit in kcctl which triggers it in some situations: kcctl/kcctl#358. |
Hey @gunnarmorling 👋 Thanks for the additional details. I'll try again to reproduce this next week. |
Yeah, it seems to happen really rarely though. It actually only happened once, since then I couldn't reproduce it. I'll let you know when I run into it again. |
👌 |
I couldn't reproduce this unfortunately... |
Me neither. Some rather rare race condition perhaps? |
Very likely... 😭 |
I can reproduce it all the time, but there is more to it than running just a single test class. /**
* {@link QuarkusTestResource QuarkusTestResources} for this module.
* <p/>
* This cannot be shared via test-jar because test resources are not picked up from other modules (by design). Subclassing wouldn't work either, see
* https://github.com/quarkusio/quarkus/issues/10299.
*
* @author fmo
*/
@QuarkusTestResource(value = MariaDBContainerQuarkusLifecycleManager.class, parallel = true)
public class ModuleWideQuarkusTestResources {
} |
@famod any chance you can attach a small sample that behaves as you mention? Thanks |
@geoand sure, if the god of time is blessing me 😉 |
Let's close this for the time being and we can reopen if more information becomes available |
Describe the bug
By mistake, I had caused an exception in the
start
method of my customMariaDBContainerQuarkusLifecycleManager
.That exception is printed just as expected, but after some skipped QuarkusTests the following exception pops up:
That NPE is a bit misleading and shouldn't be there.
Expected behavior
No NPE
Actual behavior
NPE as described above
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.16.7.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: