Fixed "Ensure no file change" build issue. Only checkstyle changes, no logic chnages (#17885)
This commit is contained in:
@@ -48,7 +48,6 @@ import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -30,7 +30,6 @@ import static com.mysql.cj.MysqlType.TINYINT_UNSIGNED;
|
||||
import static com.mysql.cj.MysqlType.TINYTEXT;
|
||||
import static com.mysql.cj.MysqlType.VARCHAR;
|
||||
import static com.mysql.cj.MysqlType.YEAR;
|
||||
import static io.airbyte.db.DataTypeUtils.TIME_FORMATTER;
|
||||
import static io.airbyte.db.jdbc.JdbcConstants.INTERNAL_COLUMN_NAME;
|
||||
import static io.airbyte.db.jdbc.JdbcConstants.INTERNAL_COLUMN_SIZE;
|
||||
import static io.airbyte.db.jdbc.JdbcConstants.INTERNAL_COLUMN_TYPE;
|
||||
@@ -44,7 +43,6 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import com.mysql.cj.MysqlType;
|
||||
import com.mysql.cj.jdbc.result.ResultSetMetaData;
|
||||
import com.mysql.cj.result.Field;
|
||||
import io.airbyte.commons.json.Jsons;
|
||||
import io.airbyte.db.DataTypeUtils;
|
||||
import io.airbyte.db.SourceOperations;
|
||||
import io.airbyte.db.jdbc.AbstractJdbcCompatibleSourceOperations;
|
||||
@@ -58,7 +56,6 @@ import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.time.format.DateTimeParseException;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -22,8 +22,8 @@ import org.slf4j.LoggerFactory;
|
||||
* 2. checking whether binlog required from saved cdc offset is available on mysql server
|
||||
* #checkBinlog method
|
||||
* </p>
|
||||
* 3. configuring initial CDC wait time. TODO : There is a lot of shared logic for this functionality
|
||||
* between MySQL and Postgres. Refactor it to reduce code de-duplication.
|
||||
* 3. configuring initial CDC wait time. TODO : There is a lot of shared logic for this
|
||||
* functionality between MySQL and Postgres. Refactor it to reduce code de-duplication.
|
||||
*/
|
||||
public class CdcConfigurationHelper {
|
||||
|
||||
|
||||
@@ -279,7 +279,7 @@ public abstract class AbstractMySqlSourceDatatypeTest extends AbstractSourceData
|
||||
.fullSourceDataType(fullSourceType)
|
||||
.airbyteType(JsonSchemaType.STRING_TIME_WITHOUT_TIMEZONE)
|
||||
// JDBC driver can process only "clock"(00:00:00-23:59:59) values.
|
||||
.addInsertValues("'-22:59:59'","'23:59:59'", "'00:00:00'")
|
||||
.addInsertValues("'-22:59:59'", "'23:59:59'", "'00:00:00'")
|
||||
.addExpectedValues("22:59:59.000000", "23:59:59.000000", "00:00:00.000000")
|
||||
.build());
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ public abstract class AbstractMySqlSslCertificateSourceAcceptanceTest extends My
|
||||
|
||||
var sslMode = getSslConfig();
|
||||
final JsonNode replicationMethod = Jsons.jsonNode(ImmutableMap.builder()
|
||||
.put("method", "STANDARD")
|
||||
.build());
|
||||
.put("method", "STANDARD")
|
||||
.build());
|
||||
config = Jsons.jsonNode(ImmutableMap.builder()
|
||||
.put(JdbcUtils.HOST_KEY, container.getHost())
|
||||
.put(JdbcUtils.PORT_KEY, container.getFirstMappedPort())
|
||||
|
||||
@@ -89,4 +89,5 @@ public abstract class AbstractSshMySqlSourceAcceptanceTest extends SourceAccepta
|
||||
protected boolean supportsPerStream() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -84,8 +84,8 @@ public class CdcBinlogsMySqlSourceDatatypeTest extends AbstractMySqlSourceDataty
|
||||
container = new MySQLContainer<>("mysql:8.0");
|
||||
container.start();
|
||||
final JsonNode replicationMethod = Jsons.jsonNode(ImmutableMap.builder()
|
||||
.put("method", "CDC")
|
||||
.put("initial_waiting_seconds", INITIAL_CDC_WAITING_SECONDS)
|
||||
.put("method", "CDC")
|
||||
.put("initial_waiting_seconds", INITIAL_CDC_WAITING_SECONDS)
|
||||
.build());
|
||||
config = Jsons.jsonNode(ImmutableMap.builder()
|
||||
.put(JdbcUtils.HOST_KEY, container.getHost())
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.testcontainers.containers.MySQLContainer;
|
||||
public class CdcInitialSnapshotMySqlSourceDatatypeTest extends AbstractMySqlSourceDatatypeTest {
|
||||
|
||||
private DSLContext dslContext;
|
||||
|
||||
@Override
|
||||
protected void tearDown(final TestDestinationEnv testEnv) {
|
||||
dslContext.close();
|
||||
|
||||
@@ -111,8 +111,8 @@ public class CdcMySqlSslCaCertificateSourceAcceptanceTest extends SourceAcceptan
|
||||
.put("client_key_password", "Passw0rd")
|
||||
.build();
|
||||
final JsonNode replicationMethod = Jsons.jsonNode(ImmutableMap.builder()
|
||||
.put("method", "CDC")
|
||||
.put("initial_waiting_seconds", INITIAL_CDC_WAITING_SECONDS)
|
||||
.put("method", "CDC")
|
||||
.put("initial_waiting_seconds", INITIAL_CDC_WAITING_SECONDS)
|
||||
.build());
|
||||
|
||||
config = Jsons.jsonNode(ImmutableMap.builder()
|
||||
|
||||
@@ -23,8 +23,8 @@ public class MySqlSslSourceAcceptanceTest extends MySqlSourceAcceptanceTest {
|
||||
container = new MySQLContainer<>("mysql:8.0");
|
||||
container.start();
|
||||
final JsonNode replicationMethod = Jsons.jsonNode(ImmutableMap.builder()
|
||||
.put("method", "STANDARD")
|
||||
.build());
|
||||
.put("method", "STANDARD")
|
||||
.build());
|
||||
|
||||
var sslMode = ImmutableMap.builder()
|
||||
.put(JdbcUtils.MODE_KEY, "required")
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Airbyte, Inc., all rights reserved.
|
||||
*/
|
||||
|
||||
package io.airbyte.integrations.io.airbyte.integration_tests.sources.utils;
|
||||
|
||||
public class TestConstants {
|
||||
|
||||
public static final int INITIAL_CDC_WAITING_SECONDS = 5;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Airbyte, Inc., all rights reserved.
|
||||
*/
|
||||
|
||||
package io.airbyte.integrations.source.mysql;
|
||||
|
||||
import static io.airbyte.integrations.source.mysql.helpers.CdcConfigurationHelper.MAX_FIRST_RECORD_WAIT_TIME;
|
||||
|
||||
@@ -161,7 +161,8 @@ class MySqlJdbcSourceAcceptanceTest extends JdbcSourceAcceptanceTest {
|
||||
((ObjectNode) config).put(JdbcUtils.USERNAME_KEY, "fake");
|
||||
final AirbyteConnectionStatus status = source.check(config);
|
||||
assertEquals(AirbyteConnectionStatus.Status.FAILED, status.getStatus());
|
||||
// do not test for message since there seems to be flakiness where sometimes the test will get the message with
|
||||
// do not test for message since there seems to be flakiness where sometimes the test will get the
|
||||
// message with
|
||||
// State code: 08001 or State code: 28000
|
||||
}
|
||||
|
||||
@@ -293,5 +294,4 @@ class MySqlJdbcSourceAcceptanceTest extends JdbcSourceAcceptanceTest {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user