-
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
Smartly apply configs for test classes #22073
Comments
/cc @geoand |
We could perhaps do this, but I am -1 because IMHO it would confuse users even more about how |
I might move then to make |
It is. It was a mistake that we can't take back however |
That's what major version number are for, right? :) |
Well, it's too disruptive a change to ever be made IMHO. |
I would argue that it's important to fix these things; I'm not the only one that will face similar issues and for the sake of developer joy it's important to address them, and have procedure in place to support the transition. Everything can't work the same way forever, things change! |
Can't you just use io.quarkus.test.junit.QuarkusTestProfile#testResources to assign resources to each profile? With regards to ordering we now have QuarkusTestProfileAwareClassOrderer to sort them by profile, so that should not be an issue. |
@GregJohnStewart with Stuart's answer, is there still missing some important feature for you? |
@stuartwdouglas Sorry for the lateness, this fell through the cracks over the holidays |
Closing as |
Description
For some context, see #22025
Essentially, I am asking that the server running for @QuarkusTest be more smartly configured, in reference to Profiles, Lifecycle Managers, and the Lifecycle Manager arguments.
In my use case, I have two profiles, that need different arguments passed to the LifecycleManager to have different things spun up for different tests. Important note here is that with some arguments, the config values given will break other tests. These breaking configs are applied to all tests.
The current solution is to apply
restrictToAnnotatedClass = true
to all tests that have the manager configured to provide the arguments that break things. However, this is an imperfect solution as it requires:I would suggest that the code handles when the Quarkus server is started back up based on
@TestProfile
also considers@QuarkusTestResource
, where if that resource annotation is different then a new service with the new lifecycle manager setup is started. I feel the caveat of "you should order your tests appropriately" is acceptable, and something I have another enhancement request for here at #22072 to make easier.Implementation ideas
No response
The text was updated successfully, but these errors were encountered: