Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: lance6716 <lance6716@gmail.com>
  • Loading branch information
lance6716 committed Aug 22, 2022
1 parent ae4d076 commit 2fb9c68
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 54 deletions.
43 changes: 0 additions & 43 deletions engine/test/integration_tests/dm_collation/conf/diff_config.toml

This file was deleted.

22 changes: 11 additions & 11 deletions engine/test/integration_tests/dm_collation/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function run() {
wait_mysql_online.sh --port 4000

# change default charset and collation for MySQL 8.0
run_sql --port 3307 "set global character_set_server='utf8mb4';set global collation_server='utf8mb4_bin';"
run_sql --port 3307 "set global character_set_server='utf8mb4';set global collation_server='utf8mb4_bin';"

# prepare data

Expand All @@ -25,10 +25,10 @@ function run() {

# create job

create_job_json=$(base64 -w0 $CUR_DIR/conf/job.yaml | jq -Rs '{ type: "DM", config: . }')
echo "create_job_json: $create_job_json"
job_id=$(curl -X POST -H "Content-Type: application/json" -d "$create_job_json" "http://127.0.0.1:10245/api/v1/jobs?tenant_id=dm_case_sensitive&project_id=dm_case_sensitive" | jq -r .id)
echo "job_id: $job_id"
create_job_json=$(base64 -w0 $CUR_DIR/conf/job.yaml | jq -Rs '{ type: "DM", config: . }')
echo "create_job_json: $create_job_json"
job_id=$(curl -X POST -H "Content-Type: application/json" -d "$create_job_json" "http://127.0.0.1:10245/api/v1/jobs?tenant_id=dm_case_sensitive&project_id=dm_case_sensitive" | jq -r .id)
echo "job_id: $job_id"

# wait for dump and load finished

Expand All @@ -41,22 +41,22 @@ function run() {
exec_with_retry 'run_sql --port 4000 "select count(1) from sync_collation2.t1 where name =' "'aa'" '\G" | grep -Fq "count(1): 2"'
exec_with_retry 'run_sql --port 4000 "select count(1) from sync_collation2.t2 where name =' "'aa'" '\G" | grep -Fq "count(1): 2"'

# insert increment data
# insert increment data

run_sql_file $CUR_DIR/data/db1.increment.sql
run_sql_file --port 3307 $CUR_DIR/data/db2.increment.sql

# check data
# check data

exec_with_retry 'run_sql --port 4000 "select count(1) from sync_collation_increment.t1 where name =' "'aa'" '\G" | grep -Fq "count(1): 2"'
exec_with_retry 'run_sql --port 4000 "select count(1) from sync_collation_increment.t1 where name =' "'aa'" '\G" | grep -Fq "count(1): 2"'
exec_with_retry 'run_sql --port 4000 "select count(1) from sync_collation_increment.t2 where name =' "'aa'" '\G" | grep -Fq "count(1): 2"'
exec_with_retry 'run_sql --port 4000 "select count(1) from sync_collation_increment2.t1 where name =' "'aa'" '\G" | grep -Fq "count(1): 2"'
exec_with_retry 'run_sql --port 4000 "select count(1) from sync_collation_increment2.t2 where name =' "'aa'" '\G" | grep -Fq "count(1): 2"'
exec_with_retry 'run_sql --port 4000 "select count(1) from sync_collation_server.t1 where name =' "'aa'" '\G" | grep -Fq "count(1): 2"'
exec_with_retry 'run_sql --port 4000 "select count(1) from sync_collation_server2.t1 where name =' "'aa'" '\G" | grep -Fq "count(1): 2"'
exec_with_retry 'run_sql --port 4000 "select count(1) from sync_collation_server.t1 where name =' "'aa'" '\G" | grep -Fq "count(1): 2"'
exec_with_retry 'run_sql --port 4000 "select count(1) from sync_collation_server2.t1 where name =' "'aa'" '\G" | grep -Fq "count(1): 2"'
}

#trap "stop_engine_cluster $CONFIG" EXIT
trap "stop_engine_cluster $CONFIG" EXIT
run $*
# TODO: handle log properly
# check_logs $WORK_DIR
Expand Down

0 comments on commit 2fb9c68

Please sign in to comment.