[mysql][test] Rename "custom.sql" to "customer.sql"

pull/266/head
Jark Wu 4 years ago committed by Leonard Xu
parent e9e78f10d6
commit ce2ee32521

@ -78,8 +78,8 @@ import static org.junit.Assert.assertEquals;
@RunWith(Parameterized.class)
public class BinlogSplitReaderTest extends MySqlTestBase {
private final UniqueDatabase customDatabase =
new UniqueDatabase(MYSQL_CONTAINER, "custom", "mysqluser", "mysqlpw");
private final UniqueDatabase customerDatabase =
new UniqueDatabase(MYSQL_CONTAINER, "customer", "mysqluser", "mysqlpw");
private final BinaryLogClient binaryLogClient;
private final MySqlConnection mySqlConnection;
@ -99,7 +99,7 @@ public class BinlogSplitReaderTest extends MySqlTestBase {
@Test
public void testReadSingleBinlogSplit() throws Exception {
customDatabase.createAndInitialize();
customerDatabase.createAndInitialize();
Configuration configuration = getConfig(new String[] {"customers"});
final DataType dataType =
DataTypes.ROW(
@ -144,7 +144,7 @@ public class BinlogSplitReaderTest extends MySqlTestBase {
@Test
public void testReadAllBinlogSplitsForOneTable() throws Exception {
customDatabase.createAndInitialize();
customerDatabase.createAndInitialize();
Configuration configuration = getConfig(new String[] {"customers"});
final DataType dataType =
DataTypes.ROW(
@ -199,7 +199,7 @@ public class BinlogSplitReaderTest extends MySqlTestBase {
@Test
public void testReadAllBinlogForTableWithSingleLine() throws Exception {
customDatabase.createAndInitialize();
customerDatabase.createAndInitialize();
Configuration configuration = getConfig(new String[] {"customer_card_single_line"});
final DataType dataType =
DataTypes.ROW(
@ -232,7 +232,7 @@ public class BinlogSplitReaderTest extends MySqlTestBase {
@Test
public void testReadAllBinlogSplitsForTables() throws Exception {
customDatabase.createAndInitialize();
customerDatabase.createAndInitialize();
Configuration configuration =
getConfig(new String[] {"customer_card", "customer_card_single_line"});
final DataType dataType =
@ -527,9 +527,9 @@ public class BinlogSplitReaderTest extends MySqlTestBase {
properties.put("database.server.name", "embedded-test");
properties.put("database.hostname", MYSQL_CONTAINER.getHost());
properties.put("database.port", String.valueOf(MYSQL_CONTAINER.getDatabasePort()));
properties.put("database.user", customDatabase.getUsername());
properties.put("database.password", customDatabase.getPassword());
properties.put("database.whitelist", customDatabase.getDatabaseName());
properties.put("database.user", customerDatabase.getUsername());
properties.put("database.password", customerDatabase.getPassword());
properties.put("database.whitelist", customerDatabase.getDatabaseName());
properties.put("database.history.skip.unparseable.ddl", "true");
properties.put("server-id-range", "1001, 1002");
properties.put("database.serverTimezone", ZoneId.of("UTC").toString());
@ -538,7 +538,7 @@ public class BinlogSplitReaderTest extends MySqlTestBase {
properties.put("database.history.instance.name", DATABASE_HISTORY_INSTANCE_NAME);
List<String> captureTableIds =
Arrays.stream(captureTables)
.map(tableName -> customDatabase.getDatabaseName() + "." + tableName)
.map(tableName -> customerDatabase.getDatabaseName() + "." + tableName)
.collect(Collectors.toList());
properties.put("table.whitelist", String.join(",", captureTableIds));
properties.put(

@ -66,8 +66,8 @@ import static org.junit.Assert.assertEquals;
@RunWith(Parameterized.class)
public class SnapshotSplitReaderTest extends MySqlTestBase {
private static final UniqueDatabase customDatabase =
new UniqueDatabase(MYSQL_CONTAINER, "custom", "mysqluser", "mysqlpw");
private static final UniqueDatabase customerDatabase =
new UniqueDatabase(MYSQL_CONTAINER, "customer", "mysqluser", "mysqlpw");
private final boolean useIntegralTypeOptimization;
private final BinaryLogClient binaryLogClient;
@ -87,7 +87,7 @@ public class SnapshotSplitReaderTest extends MySqlTestBase {
@BeforeClass
public static void init() {
customDatabase.createAndInitialize();
customerDatabase.createAndInitialize();
}
@Test
@ -319,9 +319,9 @@ public class SnapshotSplitReaderTest extends MySqlTestBase {
properties.put("database.server.name", "embedded-test");
properties.put("database.hostname", MYSQL_CONTAINER.getHost());
properties.put("database.port", String.valueOf(MYSQL_CONTAINER.getDatabasePort()));
properties.put("database.user", customDatabase.getUsername());
properties.put("database.password", customDatabase.getPassword());
properties.put("database.whitelist", customDatabase.getDatabaseName());
properties.put("database.user", customerDatabase.getUsername());
properties.put("database.password", customerDatabase.getPassword());
properties.put("database.whitelist", customerDatabase.getDatabaseName());
properties.put("database.history.skip.unparseable.ddl", "true");
properties.put("server-id-range", "1001, 1002");
properties.put("database.serverTimezone", ZoneId.of("UTC").toString());
@ -330,7 +330,7 @@ public class SnapshotSplitReaderTest extends MySqlTestBase {
properties.put("database.history.instance.name", DATABASE_HISTORY_INSTANCE_NAME);
List<String> captureTableIds =
Arrays.stream(captureTables)
.map(tableName -> customDatabase.getDatabaseName() + "." + tableName)
.map(tableName -> customerDatabase.getDatabaseName() + "." + tableName)
.collect(Collectors.toList());
properties.put("table.whitelist", String.join(",", captureTableIds));
properties.put(

@ -61,8 +61,8 @@ import static org.junit.Assert.assertThat;
/** IT tests for {@link MySqlParallelSource}. */
public class MySqlParallelSourceITCase extends MySqlTestBase {
private UniqueDatabase customDatabase =
new UniqueDatabase(MYSQL_CONTAINER, "custom", "mysqluser", "mysqlpw");
private final UniqueDatabase customerDatabase =
new UniqueDatabase(MYSQL_CONTAINER, "customer", "mysqluser", "mysqlpw");
@Test
public void testReadSingleTableWithSingleParallelism() throws Exception {
@ -85,7 +85,7 @@ public class MySqlParallelSourceITCase extends MySqlTestBase {
}
public void testReadMySQLTable(int parallelism, String[] captureTables) throws Exception {
customDatabase.createAndInitialize();
customerDatabase.createAndInitialize();
final DataType dataType =
DataTypes.ROW(
DataTypes.FIELD("id", DataTypes.BIGINT()),
@ -99,7 +99,7 @@ public class MySqlParallelSourceITCase extends MySqlTestBase {
final Configuration configuration = getConfig();
List<String> captureTableIds =
Arrays.stream(captureTables)
.map(tableName -> customDatabase.getDatabaseName() + "." + tableName)
.map(tableName -> customerDatabase.getDatabaseName() + "." + tableName)
.collect(Collectors.toList());
configuration.setString("table.whitelist", String.join(",", captureTableIds));
@ -283,10 +283,10 @@ public class MySqlParallelSourceITCase extends MySqlTestBase {
Map<String, String> properties = new HashMap<>();
properties.put("database.server.name", "embedded-test");
properties.put("database.hostname", MYSQL_CONTAINER.getHost());
properties.put("database.whitelist", customDatabase.getDatabaseName());
properties.put("database.whitelist", customerDatabase.getDatabaseName());
properties.put("database.port", String.valueOf(MYSQL_CONTAINER.getDatabasePort()));
properties.put("database.user", customDatabase.getUsername());
properties.put("database.password", customDatabase.getPassword());
properties.put("database.user", customerDatabase.getUsername());
properties.put("database.password", customerDatabase.getPassword());
properties.put("database.history.skip.unparseable.ddl", "true");
properties.put("server-id", "1001,1004");
properties.put("scan.split.size", "1024");

@ -48,12 +48,12 @@ import static org.junit.Assert.fail;
/** Tests for {@link MySqlSnapshotSplitAssigner}. */
public class MySqlSnapshotSplitAssignerTest extends MySqlTestBase {
private static final UniqueDatabase customDatabase =
new UniqueDatabase(MYSQL_CONTAINER, "custom", "mysqluser", "mysqlpw");
private static final UniqueDatabase customerDatabase =
new UniqueDatabase(MYSQL_CONTAINER, "customer", "mysqluser", "mysqlpw");
@BeforeClass
public static void init() {
customDatabase.createAndInitialize();
customerDatabase.createAndInitialize();
}
@Test
@ -193,7 +193,7 @@ public class MySqlSnapshotSplitAssignerTest extends MySqlTestBase {
configuration.setBoolean(SCAN_OPTIMIZE_INTEGRAL_KEY.key(), enableIntegralOptimization);
List<String> captureTableIds =
Arrays.stream(captureTables)
.map(tableName -> customDatabase.getDatabaseName() + "." + tableName)
.map(tableName -> customerDatabase.getDatabaseName() + "." + tableName)
.collect(Collectors.toList());
configuration.setString("table.whitelist", String.join(",", captureTableIds));
@ -364,10 +364,10 @@ public class MySqlSnapshotSplitAssignerTest extends MySqlTestBase {
Map<String, String> properties = new HashMap<>();
properties.put("database.server.name", "embedded-test");
properties.put("database.hostname", MYSQL_CONTAINER.getHost());
properties.put("database.whitelist", customDatabase.getDatabaseName());
properties.put("database.whitelist", customerDatabase.getDatabaseName());
properties.put("database.port", String.valueOf(MYSQL_CONTAINER.getDatabasePort()));
properties.put("database.user", customDatabase.getUsername());
properties.put("database.password", customDatabase.getPassword());
properties.put("database.user", customerDatabase.getUsername());
properties.put("database.password", customerDatabase.getPassword());
properties.put("database.history.skip.unparseable.ddl", "true");
properties.put("server-id.range", "1001,1004");
properties.put("scan.fetch.size", "2");

@ -14,7 +14,7 @@
-- under the License.
-- ----------------------------------------------------------------------------------------------------------------
-- DATABASE: custom
-- DATABASE: customer
-- ----------------------------------------------------------------------------------------------------------------
-- Create and populate our users using a single insert with many rows
Loading…
Cancel
Save