Open 1537592846 opened 1 month ago
/cc @geoand (kotlin)
cc @yrodiere
cc @yrodiere
Uh, do I miss some context or... ? Not sure why this is related to me.
Anyway:
Quarkus version or git rev
2.6.2.Final
I'm sorry but if that's only on Quarkus 2.6, I'm out :)
@1537592846 please try again on a maintained version of Quarkus (see https://endoflife.date/quarkus-framework; that would be Quarkus 3.8 or later I think).
If you still have a problem with a recent version of Quarkus, please provide a simple project with instructions on how to reproduce the problem, and someone will have a look.
Describe the bug
I was setting up integrations tests on my Quarkus application using JUnit and RestAssured. The way the application is setup, I'm trying to create basic entity, repository, service and resource that are all called by using the necessary methods and return errors as to be used by the front. The problem is during testing. The first entity I've replaced to use this works perfectly, and the tests implemented performed as expected, but when creating the tests for the second entity, the tests are failing to make the GET.
What I did to recreate the entity (Entity, repository, service, resource and test) was to copy/paste everything, changing the name, and if I start the server normally it works, but during the tests it returns a 404. If copying the first entity's test to the second, the test works, if copying the second entity's test to the first, it fails.
Expected behavior
The request made in the test of the second entity does not return 404.
Actual behavior
The request made in the test of the second entity does is currently returning 404.
How to Reproduce?
I'm not sure how to recreate it.
Output of
uname -a
orver
Microsoft Windows [version 10.0.22631.3737]
Output of
java -version
Java not installed, using IntelliJ version (corretto-17 Amazon Corretto 17.0.11)
Quarkus version or git rev
2.6.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Additional information
This is the setup I made:
Basic entity:
Entity example:
Can't create a single base repository due to panache repositories shenanigans with
@Default
, so each class would have this code. BaseRepository:And entity repositories use it like this:
Services are redirects from the endpoints in the resource, treating the data for the repositories, and resources are created to receive data from the front and send them directly to the service. Both of them have bases created for them implementing the default methods.
This is how the test is implemented:
This is replicated to the other tests, and can be changed if needed. Will post more details if needed.