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.


> 9 dec. 2022 kl. 09:01 skrev Alexander Najafi Anzén <[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 a topic in the Google 
> Groups "dropwizard-user" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/dropwizard-user/cYJnPog0xjU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dropwizard-user/babfebdb-8b89-4c5e-a6a5-750284c7ddf5n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/dropwizard-user/babfebdb-8b89-4c5e-a6a5-750284c7ddf5n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/A65144C0-393D-4919-A9B0-B18895D6D0F7%40gmail.com.

Reply via email to