Skip to content

Allow changing quarkus.configuration.build-time-mismatch-at-runtime property in Integration Test Test Profile #48038

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

Open
dcheng1248 opened this issue May 24, 2025 · 1 comment
Labels
area/config kind/enhancement New feature or request

Comments

@dcheng1248
Copy link
Contributor

Description

In Quarkus Integration Tests the quarkus.configuration.build-time-mismatch-at-runtime defaults to warn if no test profiles are activated, but defaults to fail if test profiles are activated. If the test profile exists, having quarkus.configuration.build-time-mismatch-at-runtime = warn in neither the application properties file nor in the test profile can change the behavior to warn.

It would be helpful if this property can be set with the test profile itself or application properties file. This would simplify running integration tests in specific use cases where the setting to warn is necessary.

Example use case:
Artemis Test Resource (from quarkus-artemis) binds several properties both at build and run time. A broker.xml is needed to use the test resource and it changes the values of the build time properties. When this test resource is used, test profiles currently cannot be easily used in integrration tests, otherwise the application would fail to start.

This was not an issue in Quarkus 3.17 but seems to be a problem in Quarkus 3.18 and after (although I only tested 3.17 -> 3.22).

Implementation ideas

I think moving the properties.put("quarkus.config.build-time-mismatch-at-runtime", "fail"); line to the first line after if (profile != null) would in IntegrationTestUtil could do the job. I'm not sure if it would cause other unintended regressions - remains to be tested.

@dcheng1248 dcheng1248 added the kind/enhancement New feature or request label May 24, 2025
Copy link

quarkus-bot bot commented May 24, 2025

/cc @radcortez (config)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant