I also tried setting up a Suite without any success
@Suite
@SelectClasses({FirstIT.class, SecondIT.class})
public class MyTestSuite {
public static final DropwizardAppExtension<MyServiceConfiguration>
DROPWIZARD
=
new DropwizardAppExtension<>(MyApplication.class, ResourceHelpers.
resourceFilePath("testing.yml"));
}
And the tests:
@ExtendWith(DropwizardExtensionsSupport.class)
public class FirstIT {
public static final DropwizardAppExtension<MyServiceConfiguration> RULE =
MyTestSuite.DROPWIZARD;
}
@ExtendWith(DropwizardExtensionsSupport.class)
public class SecondIT {
public static final DropwizardAppExtension<MyServiceConfiguration> RULE
= MyTestSuite.DROPWIZARD;
}
But still, Dropwizard restarts before each class..
fredag 9 december 2022 kl. 09:01:17 UTC+1 skrev [email protected]:
> We have a setup with quite a large number of integration tests, each in
> different classes. For every test we start Dropwizard using the
> DropwizardAppExtension as exaplined in the documentation, example below.
>
> Using the AppExtension causes the Dropwizard application to start before
> running the tests of each class and to stop the application when the tests
> has finished.
>
> Our issue is that the startup and shutdown process of our application is
> quite heavy and takes some time (~15 seconds). We have to connect to
> subscribe Kafka topics, do some work and so on which takes a lot of time.
>
> Is there any way to start Dropwizard once and reuse it for all integration
> tests? I know Spring Boot has this feature and only starts a new instance
> of the application if the configuration differs between applications.
>
> In every integration test we start up the application using something like:
>
> public static final DropwizardAppExtension<MyServiceConfiguration> RULE =
> new DropwizardAppExtension<>(
> MyApplication.class, ResourceHelpers.resourceFilePath("testing.yml"));
>
--
You received this message because you are subscribed to the Google Groups
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dropwizard-user/bca20a6e-7214-4ca5-be2e-0aa5f2da24e6n%40googlegroups.com.