Class ConnectorTestingExtension
java.lang.Object
org.apache.flink.connector.testframe.junit.extensions.ConnectorTestingExtension
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback,org.junit.jupiter.api.extension.BeforeAllCallback,org.junit.jupiter.api.extension.Extension
@Internal
public class ConnectorTestingExtension
extends Object
implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback
A JUnit 5
Extension for supporting running of connector testing framework.
This extension is responsible for searching test resources annotated by TestEnv,
TestExternalSystem and TestContext, storing them into storage provided by JUnit,
and manage lifecycle of these resources.
The extension uses ExtensionContext.Store for handing over test resources to TestCaseInvocationContextProvider, which will inject these resources into test cases as
parameters.
The order of initialization is promised to be:
- Test environment annotated by
TestEnv, before all test cases in this extension - External system annotated by
TestExternalSystem, before all test cases in this extension - External contexts annotated by
TestContext, before each test case inTestCaseInvocationContextProvider
-
Field Details
-
TEST_RESOURCE_NAMESPACE
public static final org.junit.jupiter.api.extension.ExtensionContext.Namespace TEST_RESOURCE_NAMESPACE -
TEST_ENV_STORE_KEY
- See Also:
-
EXTERNAL_SYSTEM_STORE_KEY
- See Also:
-
EXTERNAL_CONTEXT_FACTORIES_STORE_KEY
- See Also:
-
SUPPORTED_SEMANTIC_STORE_KEY
- See Also:
-
-
Constructor Details
-
ConnectorTestingExtension
public ConnectorTestingExtension()
-
-
Method Details