Set Profile in tests

113 views
Skip to first unread message

Alex Soto Bueno

unread,
Dec 19, 2019, 5:06:18 AM12/19/19
to Quarkus Development mailing list
Hi I have one question, is there any plan/workaround to set a specific profile to run in test runs? I read about it with a workaround (https://github.com/quarkusio/quarkus/blob/master/extensions/hibernate-orm/deployment/src/test/java/io/quarkus/hibernate/orm/PersistenceAndQuarkusConfigTest.java#L21) but I do not like very much for normal use cases, I'd like to have something like:

@Profile("test, myprofile")


which means that the Quarkus is started with both profiles enabled.
Of course, I could play with surefire properties to make it work, but I'd like to be able to set more than one profile at once and also do it in testing code.

The reason for having more than one profile enabled is that there might be some properties that you might want to inherit from test profile.

Stuart Douglas

unread,
Dec 19, 2019, 8:49:28 PM12/19/19
to Alex Soto Bueno, Quarkus Development mailing list
Is this for QuarkusUnitTest or for @QuarkusTest?

The issue with @QuarkusTest is that it only starts the app once. If we were going to implement this it would need to restart every time a test had a different profile.

Stuart

--
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/bcb90e0f-c033-4fee-bfa6-c2bb22503eb0%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages