Class and Description |
---|
org.sdase.commons.server.testing.DropwizardRuleHelper
Prefer the original
DropwizardAppRule and a config file with the following
minimal content:
Instead of specifying connectors in a config file you can create random ports
programmatically:
When using Junit5 use DropwizardAppExtension . |
org.sdase.commons.server.testing.Environment
Java 17 will make it very cumbersome using environment variables; try to use system
properties instead
|
org.sdase.commons.server.testing.EnvironmentRule
changing environment variables is not easily supported in Java 17; please consider
using
SystemPropertyRule instead |
org.sdase.commons.server.testing.LazyRule
Use
ConfigOverride.config(String, Supplier) instead.
The above example can be written as:
class MyTest { private static final WireMockClassRule WIRE = new WireMockClassRule(wireMockConfig().dynamicPort()); private static final DropwizardAppRule<AppConfiguration> DW = new DropwizardAppRule<>( TestApplication.class, ResourceHelpers.resourceFilePath("test-config.yml"), ConfigOverride.config("url", WIRE::baseUrl)); // or ConfigOverride.config("url", () -> WIRE.baseUrl())); @ClassRule public static final RuleChain CHAIN = RuleChain.outerRule(WIRE).around(DW); } |
org.sdase.commons.server.testing.RetryRule
Migrate to JUnit 5 and prefer JUnit Pioneer's
RetryingTest |
org.sdase.commons.server.testing.SystemPropertyRule
Please update to JUnit 5 and use
SystemPropertyClassExtension or JUnit
Pioneer's SetSystemProperty |