Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
GMHDBJD committed Jun 29, 2021
1 parent e7a66cd commit 5f9555a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/upstream-switch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- master
- release-2.0
pull_request:
branches:
- master
- release-2.0
schedule:
- cron: '3 22 * * *' # run at minute 06:03 UTC+8

Expand Down
2 changes: 1 addition & 1 deletion tests/_utils/test_prepare
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,6 @@ function init_cluster(){
}

function get_master_status() {
arr=$(echo "show master status;" | MYSQL_PWD=123456 mysql -uroot -h127.0.0.1 -P3306 | awk 'NR==2')
arr=$(echo "show master status;" | MYSQL_PWD=123456 mysql -uroot -h$1 -P3306 | awk 'NR==2')
echo $arr
}
2 changes: 1 addition & 1 deletion tests/downstream_more_column/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function run() {

# start DM task in incremental mode
# schemaTracker create table from downstream
master_status=($(get_master_status))
master_status=($(get_master_status $MYSQL_HOST1))
cp $cur/conf/dm-task-incremental.yaml $WORK_DIR/dm-task-incremental.yaml
sed -i "s/binlog-gtid-placeholder/${master_status[2]}/g" $WORK_DIR/dm-task-incremental.yaml
run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
Expand Down
1 change: 1 addition & 0 deletions tests/upstream_switch/case.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -eu
CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
PATH=$CUR/../_utils:$PATH # for sync_diff_inspector

source $cur/../_utils/test_prepare
source $CUR/lib.sh

function clean_data() {
Expand Down
5 changes: 0 additions & 5 deletions tests/upstream_switch/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ function prepare_less_binlogs() {
exec_sql $1 "insert into db2.tb2 values(2),(3);"
}

function get_master_status() {
arr=$(echo "show master status;" | MYSQL_PWD=123456 mysql -uroot -h$1 -P3306 | awk 'NR==2')
echo $arr
}

function change_master_to_pos() {
exec_sql $1 "stop slave;"
echo "change master to master_host='$2',master_user='root',master_password='123456',master_log_file='$3',master_log_pos=$4;"
Expand Down

0 comments on commit 5f9555a

Please sign in to comment.