-
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
Error running Panache Reactive Test with IntelliJ JUnit template #15131
Comments
/cc @FroMage, @loicmathieu |
This must be related to the changes in HR where we mandate access from the IO thread, but I don't understand why this would have passed CI, there's no reason why running from the CLI should behave differently to running from the IDE. |
I just tried this on our Can you share a sample project that exhibits the problematic behavior please? |
The quickstart runs from an IO thread, no? This is when running directly from a |
I guess (by just looking at the stacktrace), but that is why I would like to have a project that exhibits the behavior. |
Oh, I thought this was our CI tests. OK, then I bet this is becaue our CI tests run this in a transaction and then block waiting for them, which makes them run on the IO thread, because we can do this for transactions. |
Right, that makes sense. If we have an example of what OP is trying to do, at the very least we need to document what the expected behavior is |
Hi, please note here: https://github.com/hernael/reactive-demo I create a test call RepositoryTest with 2 methods. |
Yes, that's it. Can you try using |
I just tried like this:
but they still keep failing |
|
running them both together in Intellij fails, or running one by one also fail :( |
Can you provide the docker run you are using to start postgresql so we can try your example? |
I use a simple postgres:13.1-alpine image, My data inside this image is very heavy, so i can't share it. But come on! it's a simple table demo with id and description fields. You can use any table |
The issue is that anyone on the team has to run plenty of such examples everyday, so spending time trying to figure out how to run each different one, is not a very productive use of our time. |
sorry but i can't provide what you request |
I'm experiencing the same issue: some tests are failing with this same error after migrating from 10.5 to 11. |
I have not migrated from version 1.10.5 to any later version (1.11.x, 1.12.x or 1.13.0) because I have problems with the test and reactive panache (#14709) in those versions :( |
Hey everyone, I created a small demo to reproduce the issue; there is also the script to create the DB container, you just need to run that and then run the tests. Hope this can help! |
I'm trying to see if I can reproduce this in our ITs, but I'm running into this issue @DavideD:
Any idea how I can work around this? |
It appears that if |
1..0.0.CR2 should be available on Maven Central now |
Thanks! |
This is worse. Turns out the HR/Panache IT tests don't appear to even run ATM. I wonder why CI doesn't run them? |
I have the same problem but without Panache. Running a query using |
Which tests are you talking about? |
For the benefit of testing, we should provide some kind of facility to allow the repository to be called from a non IO thread |
If it helps, Vert.x Unit Testing for Junit 4 has a rule that helps running tests in a Vert.x Context: https://vertx.io/docs/vertx-unit/java/#_running_a_test_on_a_vert_x_context An equivalent is missing for Junit 5. |
That's very interesting, thanks! |
This has likely been fixed in #17728 which is part of |
I've just tested this with the latest snapshots and it seems to work without errors now. I had to change a couple of tests from:
to
But the Vert.x exception doesn't occur anymore |
Thanks for checking! I'll close this based on that information. If this comes up again, feel free to reopen |
Describe the bug
Since 1.11.x Quarkus version, the Test in IntelliJ fail.
In 1.10.5 work fine.
Actual behavior
when run Panache Reactive Test with IntelliJ JUnit template throws the following error:
To Reproduce
Just create a test to a Reactive Panache Repository and run it with IntelliJ JUnit template
Environment (please complete the following information):
uname -a
orver
: Linux 5.3.18-lp152.60-default x86_64 x86_64 x86_64 GNU/Linuxjava -version
: OpenJDK 64-Bit Server VM Corretto-11.0.10.9.1 (build 11.0.10+9-LTS, mixed mode)mvnw --version
orgradlew --version
): 3.6.3The text was updated successfully, but these errors were encountered: