Panache and Test on Command Mode Applications #39338
lecogiteur
started this conversation in
Community
Replies: 2 comments 1 reply
-
Need Help please :) |
Beta Was this translation helpful? Give feedback.
1 reply
-
Is there any workaround available for this issue? What is the reason for CDI not being available in @QuarkusMainTest? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have created a simple command mode applications. I just insert elements in database (postgres) using PanacheEntity.
It works well. No problem.
I try to create a test but it seems I can't use the PanacheEntity in the test method.
The Entity
The Main
The test
When I execute the test, it insert the person in database (I have checked with my sql client in database). But after, the test fails with this error (when it executes the test method content):
But
If I use
@QuarkusTest
I can executePerson.count()
in test but the application is not launched so it's uselessEDIT:
This code works well. But I need to launch application manually
Why I can't use @QuarkusMainTest with PanacheEntity ? Or how to use it with JPA?
Someone can help me?
Beta Was this translation helpful? Give feedback.
All reactions