--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo-mBG3cddtko6pfucLYKwhDhQXJQTjs%3DGfyB9PAR8OR6A%40mail.gmail.com.
Georgios Andrianakis
Independent Contractor
I more than anyone carry the blame of not foreseeing how large of an effect this would have.As for the path forward, I'm actually really undecided because on one hand the deprecation clearly leads people to simply swap the old annotation with the new one without looking at the value of restrictToAnnotatedClass, but on the other hand undeprecating it will likely mean we will be stuck with the old behavior forever (behavior which is problematic in a totally different sense - mainly a developer experience sense).
----Guillaume
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo-%3DMiGR%3DLi80V-sYCoNzziz3NoR513uKa4GWBGpOBhDug%40mail.gmail.com.
My personal experience with @QuarkusTestResource was that :- It was very unintuitive that it applied to other classes,- In most cases people put it on a random number of test classes, sometimes with different configuration, which just made it weird,- When running a single unannotated/unrelated test class, unrelated test resources would start, causing slow testsIMO, @WithTestResource makes a lot more sense and is more intuitive, which is why we ended up with it.
That being said, it makes a lot of sense to be able to group test resources, and apply them to several test classes, but IMO the proper unit to apply that annotation may be the package? This would scope the test resource to all test classes to the package and subpackages? This would allow running a great number of tests with the same Quarkus instance (as was the case with `restrictToAnnotatedClass = false`) but in a way where scoping is quite obvious.If we wanted to be more fine-grained than package+subpackages (which frankly I think is enough), we could make it a meta-annotation:@WithTestResource(expensiveTestResource.class)public @annotation WithExpensive {}And then every test annotated with @WithExpensive gets grouped together in a single run (I suppose we could start by forbidding more than one such annotation on a given test class, to avoid having to deal with ven diagrams of groups, though we could have more than one test resource per meta annotation).This should go a long way towards being able to properly scope which test resources apply to which tests, and how many Quarkus deployments we need for these groups.Now, I agree, this is not really the heart of the discussion, which is about undeprecating @QuarkusTestResource, but perhaps the upgrade tool would move every instance of @QuarkusTestResource onto the package, instead of migrating them to @WithTestResource, and we'd keep the previous behaviour (single deployment, test resources shared, fast tests) while translating into a sane scoping that people could replace with @WithTestResource if they had the need?
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAKU9E9uHRWW_EVNG7RyX%2BiJM0rvk6eiU18OFbDbTvdE%3DMqcHhA%40mail.gmail.com.
--Guillaume
My personal experience with @QuarkusTestResource was that :- It was very unintuitive that it applied to other classes,- In most cases people put it on a random number of test classes, sometimes with different configuration, which just made it weird,- When running a single unannotated/unrelated test class, unrelated test resources would start, causing slow testsIMO, @WithTestResource makes a lot more sense and is more intuitive, which is why we ended up with it.That being said, it makes a lot of sense to be able to group test resources, and apply them to several test classes, but IMO the proper unit to apply that annotation may be the package? This would scope the test resource to all test classes to the package and subpackages? This would allow running a great number of tests with the same Quarkus instance (as was the case with `restrictToAnnotatedClass = false`) but in a way where scoping is quite obvious.
On Mon, Aug 26, 2024 at 3:58 PM Stephane Epardaud <stephane...@gmail.com> wrote:My personal experience with @QuarkusTestResource was that :- It was very unintuitive that it applied to other classes,- In most cases people put it on a random number of test classes, sometimes with different configuration, which just made it weird,- When running a single unannotated/unrelated test class, unrelated test resources would start, causing slow testsIMO, @WithTestResource makes a lot more sense and is more intuitive, which is why we ended up with it.It makes sense but it doesn't work at all in the current state of things.If you have a bunch of tests and each requires a resource, you end up with a very slow and memory hungry test suite.And that's what people manually updating are migrating to from the feedback we had (well we are saying isolated tests with specific resources are better after all).
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo9j-ncOzizUW7Hr-5E6MLVVew6RC0X2Y%3Dy2NyswjNzSgw%40mail.gmail.com.