From 99d50397440b3c59421030f9ea3e7c382898adfc Mon Sep 17 00:00:00 2001 From: amyangfei Date: Sat, 16 Mar 2019 11:33:15 +0800 Subject: [PATCH] *: fix mysql port --- tests/_utils/test_prepare | 4 ++-- tests/all_mode/run.sh | 8 ++++---- tests/online_ddl/run.sh | 8 ++++---- tests/sharding/run.sh | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/_utils/test_prepare b/tests/_utils/test_prepare index f61f430f7a..82b6d535ae 100644 --- a/tests/_utils/test_prepare +++ b/tests/_utils/test_prepare @@ -1,5 +1,5 @@ -DB1_PORT=3306 -DB2_PORT=3308 +MYSQL_PORT1=${MYSQL_PORT1:-3306} +MYSQL_PORT2=${MYSQL_PORT2:-3307} TIDB_PORT=4000 MASTER_PORT=8261 WORKER1_PORT=8262 diff --git a/tests/all_mode/run.sh b/tests/all_mode/run.sh index 00720a1ee6..64b1d987bf 100755 --- a/tests/all_mode/run.sh +++ b/tests/all_mode/run.sh @@ -7,9 +7,9 @@ source $cur/../_utils/test_prepare WORK_DIR=$TEST_DIR/$TEST_NAME function run() { - run_sql_file $cur/data/db1.prepare.sql $DB1_PORT + run_sql_file $cur/data/db1.prepare.sql $MYSQL_PORT1 check_contains 'Query OK, 2 rows affected' - run_sql_file $cur/data/db2.prepare.sql $DB2_PORT + run_sql_file $cur/data/db2.prepare.sql $MYSQL_PORT2 check_contains 'Query OK, 3 rows affected' run_dm_worker $WORK_DIR/worker1 $WORKER1_PORT $cur/conf/dm-worker1.toml @@ -27,8 +27,8 @@ function run() { # use sync_diff_inspector to check full dump loader check_sync_diff $WORK_DIR $cur/conf/diff_config.toml - run_sql_file $cur/data/db1.increment.sql $DB1_PORT - run_sql_file $cur/data/db2.increment.sql $DB2_PORT + run_sql_file $cur/data/db1.increment.sql $MYSQL_PORT1 + run_sql_file $cur/data/db2.increment.sql $MYSQL_PORT2 # use sync_diff_inspector to check data now! check_sync_diff $WORK_DIR $cur/conf/diff_config.toml diff --git a/tests/online_ddl/run.sh b/tests/online_ddl/run.sh index 8abaf8987c..c039188e9a 100755 --- a/tests/online_ddl/run.sh +++ b/tests/online_ddl/run.sh @@ -7,9 +7,9 @@ source $cur/../_utils/test_prepare WORK_DIR=$TEST_DIR/$TEST_NAME function run() { - run_sql_file $cur/data/db1.prepare.sql $DB1_PORT + run_sql_file $cur/data/db1.prepare.sql $MYSQL_PORT1 check_contains 'Query OK, 2 rows affected' - run_sql_file $cur/data/db2.prepare.sql $DB2_PORT + run_sql_file $cur/data/db2.prepare.sql $MYSQL_PORT2 check_contains 'Query OK, 3 rows affected' run_dm_worker $WORK_DIR/worker1 $WORKER1_PORT $cur/conf/dm-worker1.toml @@ -28,8 +28,8 @@ function run() { # use sync_diff_inspector to check full dump loader check_sync_diff $WORK_DIR $cur/conf/diff_config.toml - run_sql_file_online_ddl $cur/data/db1.increment.sql $DB1_PORT $TEST_NAME gh-ost - run_sql_file_online_ddl $cur/data/db2.increment.sql $DB2_PORT $TEST_NAME gh-ost + run_sql_file_online_ddl $cur/data/db1.increment.sql $MYSQL_PORT1 $TEST_NAME gh-ost + run_sql_file_online_ddl $cur/data/db2.increment.sql $MYSQL_PORT2 $TEST_NAME gh-ost # TODO: check sharding partition id # use sync_diff_inspector to check data now! diff --git a/tests/sharding/run.sh b/tests/sharding/run.sh index 594c502ff1..70b808a181 100755 --- a/tests/sharding/run.sh +++ b/tests/sharding/run.sh @@ -7,9 +7,9 @@ source $cur/../_utils/test_prepare WORK_DIR=$TEST_DIR/$TEST_NAME function run() { - run_sql_file $cur/data/db1.prepare.sql $DB1_PORT + run_sql_file $cur/data/db1.prepare.sql $MYSQL_PORT1 check_contains 'Query OK, 2 rows affected' - run_sql_file $cur/data/db2.prepare.sql $DB2_PORT + run_sql_file $cur/data/db2.prepare.sql $MYSQL_PORT2 check_contains 'Query OK, 3 rows affected' run_dm_worker $WORK_DIR/worker1 $WORKER1_PORT $cur/conf/dm-worker1.toml @@ -28,8 +28,8 @@ function run() { # use sync_diff_inspector to check full dump loader check_sync_diff $WORK_DIR $cur/conf/diff_config.toml - run_sql_file $cur/data/db1.increment.sql $DB1_PORT - run_sql_file $cur/data/db2.increment.sql $DB2_PORT + run_sql_file $cur/data/db1.increment.sql $MYSQL_PORT1 + run_sql_file $cur/data/db2.increment.sql $MYSQL_PORT2 # TODO: check sharding partition id # use sync_diff_inspector to check data now!