Class DB2ConnectorIT
- java.lang.Object
-
- io.debezium.testing.openshift.ConnectorTestBase
-
- io.debezium.testing.openshift.db2.DB2ConnectorIT
-
@TestMethodOrder(org.junit.jupiter.api.MethodOrderer.OrderAnnotation.class) @Tag("acceptance") @Tag("db2 ") public class DB2ConnectorIT extends ConnectorTestBase- Author:
- Jakub Cechacek
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONNECTOR_NAMEprivate static io.debezium.testing.openshift.tools.kafka.ConnectorConfigBuilderconnectorConfigprivate static StringconnectorNamestatic StringDB_DEPLOYMENT_PATHstatic StringDB_SERVICE_PATHstatic StringDB_SERVICE_PATH_LBprivate static io.debezium.testing.openshift.tools.databases.SqlDatabaseControllerdbControllerprivate static StringdbServerNameprivate static okhttp3.OkHttpClienthttpClient-
Fields inherited from class io.debezium.testing.openshift.ConnectorTestBase
assertions, connectorFactories, KAFKA, KAFKA_CONNECT_S2I, KAFKA_CONNECT_S2I_LOGGING, KAFKA_CONSUMER_PROPS, kafkaConnectController, kafkaController, ocp, operatorController, REGISTRY_DEPLOYMENT_PATH, REGISTRY_ID_TOPIC_PATH, REGISTRY_STORAGE_TOPIC_PATH, registryController, registryDeployer, testUtils
-
-
Constructor Summary
Constructors Constructor Description DB2ConnectorIT()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidinsertCustomer(String firstName, String lastName, String email)static voidsetupDatabase()voidshouldBeDown()voidshouldBeDownAfterCrash()voidshouldContainRecordsInCustomersTopic()voidshouldCreateKafkaTopics()voidshouldHaveRegisteredConnector()voidshouldResumeStreamingAfterCrash()voidshouldResumeStreamingAfterRedeployment()voidshouldStreamChanges()static voidtearDownDatabase()-
Methods inherited from class io.debezium.testing.openshift.ConnectorTestBase
setup, teardown
-
-
-
-
Field Detail
-
DB_DEPLOYMENT_PATH
public static final String DB_DEPLOYMENT_PATH
- See Also:
- Constant Field Values
-
DB_SERVICE_PATH_LB
public static final String DB_SERVICE_PATH_LB
- See Also:
- Constant Field Values
-
DB_SERVICE_PATH
public static final String DB_SERVICE_PATH
- See Also:
- Constant Field Values
-
CONNECTOR_NAME
public static final String CONNECTOR_NAME
- See Also:
- Constant Field Values
-
dbController
private static io.debezium.testing.openshift.tools.databases.SqlDatabaseController dbController
-
httpClient
private static okhttp3.OkHttpClient httpClient
-
connectorConfig
private static io.debezium.testing.openshift.tools.kafka.ConnectorConfigBuilder connectorConfig
-
connectorName
private static String connectorName
-
dbServerName
private static String dbServerName
-
-
Method Detail
-
setupDatabase
@BeforeAll public static void setupDatabase() throws IOException, InterruptedException, ClassNotFoundException
-
tearDownDatabase
@AfterAll public static void tearDownDatabase() throws IOException, InterruptedException- Throws:
IOExceptionInterruptedException
-
insertCustomer
private void insertCustomer(String firstName, String lastName, String email) throws SQLException
- Throws:
SQLException
-
shouldHaveRegisteredConnector
@Test @Order(1) public void shouldHaveRegisteredConnector()
-
shouldCreateKafkaTopics
@Test @Order(2) public void shouldCreateKafkaTopics()
-
shouldContainRecordsInCustomersTopic
@Test @Order(3) public void shouldContainRecordsInCustomersTopic() throws IOException- Throws:
IOException
-
shouldStreamChanges
@Test @Order(4) public void shouldStreamChanges() throws SQLException- Throws:
SQLException
-
shouldBeDown
@Test @Order(5) public void shouldBeDown() throws SQLException, IOException- Throws:
SQLExceptionIOException
-
shouldResumeStreamingAfterRedeployment
@Test @Order(6) public void shouldResumeStreamingAfterRedeployment() throws IOException, InterruptedException- Throws:
IOExceptionInterruptedException
-
shouldBeDownAfterCrash
@Test @Order(7) public void shouldBeDownAfterCrash() throws SQLException- Throws:
SQLException
-
shouldResumeStreamingAfterCrash
@Test @Order(8) public void shouldResumeStreamingAfterCrash() throws InterruptedException- Throws:
InterruptedException
-
-