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"));