Package io.quarkus.test.common
Class TestConfigUtil
java.lang.Object
io.quarkus.test.common.TestConfigUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionargLineValue(org.eclipse.microprofile.config.Config config) Deprecated, for removal: This API element is subject to removal in a future version.argLineValues(String argLine) static voidcleanUp()Clean up config left over from badly-behaving previous tests.env(org.eclipse.microprofile.config.Config config) Deprecated, for removal: This API element is subject to removal in a future version.static StringintegrationTestProfile(org.eclipse.microprofile.config.Config config) Deprecated, for removal: This API element is subject to removal in a future version.static StringrunTarget(org.eclipse.microprofile.config.Config config) static DurationwaitTimeValue(org.eclipse.microprofile.config.Config config) Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
DEFAULT_WAIT_TIME_SECONDS
public static final long DEFAULT_WAIT_TIME_SECONDS- See Also:
-
-
Method Details
-
argLineValues
-
argLineValue
@Deprecated(forRemoval=true, since="3.17") public static List<String> argLineValue(org.eclipse.microprofile.config.Config config) Deprecated, for removal: This API element is subject to removal in a future version. -
env
@Deprecated(forRemoval=true, since="3.17") public static Map<String,String> env(org.eclipse.microprofile.config.Config config) Deprecated, for removal: This API element is subject to removal in a future version. -
waitTimeValue
@Deprecated(forRemoval=true, since="3.17") public static Duration waitTimeValue(org.eclipse.microprofile.config.Config config) Deprecated, for removal: This API element is subject to removal in a future version. -
integrationTestProfile
@Deprecated(forRemoval=true, since="3.17") public static String integrationTestProfile(org.eclipse.microprofile.config.Config config) Deprecated, for removal: This API element is subject to removal in a future version. -
runTarget
-
cleanUp
public static void cleanUp()Clean up config left over from badly-behaving previous tests.Tests may call ConfigProvider.getConfig() directly or indirectly, triggering lazy initialization in QuarkusConfigFactory#getConfigFor, and if they don't call QuarkusConfigFactory.setConfig(null) afterward, they may leak that config. As it's quite hard to guarantee that all tests clean up after them, especially if they don't use any Quarkus*Test extensions, we call this cleanup here in Quarkus*Test extensions as an additional safeguard.
Note this must be called quite early in extensions in order to be effective: things like TestHTTPResourceManager#getUri make use of config and may be called very early, upon test instantiation, so cleaning up in beforeEach() won't cut it for example.
-