Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
*: fix mysql port
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei committed Mar 16, 2019
1 parent deac978 commit 99d5039
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions tests/_utils/test_prepare
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions tests/all_mode/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions tests/online_ddl/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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!
Expand Down
8 changes: 4 additions & 4 deletions tests/sharding/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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!
Expand Down

0 comments on commit 99d5039

Please sign in to comment.