Skip to content

Restructure testing strategy to remove need for extra flag on build#23

Merged
holly-cummins merged 2 commits intoquarkusio:mainfrom
holly-cummins:simplify-build-instructions
Oct 30, 2025
Merged

Restructure testing strategy to remove need for extra flag on build#23
holly-cummins merged 2 commits intoquarkusio:mainfrom
holly-cummins:simplify-build-instructions

Conversation

@holly-cummins
Copy link
Copy Markdown
Collaborator

We would like it so that mvn verify works out of the box on the Quarkus project. The reason it doesn't is because the QuarkusIntegrationTest runs in prod mode (as all integration tests do), and it assumes the database has been populated. We can move its tests to a QuarkusTest, which runs in test mode and so gets a populated database. Then, because of course we still want the QuarkusIntegrationTest coverage, we can make a QuarkusIntegrationTest which assumes the database is empty on startup.

This setup is hard to replicate in the Spring projects, and it means the Quarkus projects have more test coverage. I think this is ok, since we want the Quarkus project to be equivalent, but also idiomatic.

@holly-cummins holly-cummins force-pushed the simplify-build-instructions branch from 66fc0d0 to d22c642 Compare October 30, 2025 16:32
Copy link
Copy Markdown
Collaborator

@edeandrea edeandrea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - can you also do the same on the other quarkus project so that they are the same?

@holly-cummins
Copy link
Copy Markdown
Collaborator Author

LGTM - can you also do the same on the other quarkus project so that they are the same?

Will do. I wondered about doing it and then wasn't sure if its testing should mirror the spring-y testing or the Quarkus testing. But I guess it can't fully mirror spring so it should go all in on Quarkus.

@edeandrea
Copy link
Copy Markdown
Collaborator

LGTM - can you also do the same on the other quarkus project so that they are the same?

Will do. I wondered about doing it and then wasn't sure if its testing should mirror the spring-y testing or the Quarkus testing. But I guess it can't fully mirror spring so it should go all in on Quarkus.

Until the spring testing working group completes :) Then it should mirror spring :)

@holly-cummins
Copy link
Copy Markdown
Collaborator Author

LGTM - can you also do the same on the other quarkus project so that they are the same?

Will do. I wondered about doing it and then wasn't sure if its testing should mirror the spring-y testing or the Quarkus testing. But I guess it can't fully mirror spring so it should go all in on Quarkus.

Done! I had to make an adaptation to the application because by default the import.sql is always being loaded, even in prod mode.

I also spotted that quarkusio/quarkus#40037 means we do not need to rename the data.sql file to import.sql on the spring project, so I renamed that file to reduce the diff to spring.

@holly-cummins holly-cummins force-pushed the simplify-build-instructions branch from 0a6f002 to 1e20f14 Compare October 30, 2025 20:20
@holly-cummins holly-cummins merged commit b678bac into quarkusio:main Oct 30, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants