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

Commit

Permalink
test: relax error message for more tidb version (#1251) (#1252)
Browse files Browse the repository at this point in the history
  • Loading branch information
lance6716 authored Oct 30, 2020
1 parent aa1ed5e commit e6ca256
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/all_mode/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ function test_session_config(){
sed -i "s/name: test/name: $ILLEGAL_CHAR_NAME/g" $WORK_DIR/dm-task.yaml

# error config
# there should be a error message like "Incorrect argument type to variable 'tidb_retry_limit'"
# but different TiDB version output different message. so we only roughly match here
sed -i 's/tidb_retry_limit: "10"/tidb_retry_limit: "fjs"/g' $WORK_DIR/dm-task.yaml
run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"start-task $WORK_DIR/dm-task.yaml --remove-meta" \
"Incorrect argument type to variable 'tidb_retry_limit'" 1
"tidb_retry_limit" 1

sed -i 's/tidb_retry_limit: "fjs"/tidb_retry_limit: "10"/g' $WORK_DIR/dm-task.yaml
dmctl_start_task "$WORK_DIR/dm-task.yaml" "--remove-meta"
Expand Down
3 changes: 2 additions & 1 deletion tests/import_v10x/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ function run() {

run_sql "show create table \`dm_meta\`.\`test_syncer_checkpoint\`" $TIDB_PORT $TIDB_PASSWORD
check_contains "\`exit_safe_binlog_name\` varchar(128) DEFAULT ''"
check_contains "\`exit_safe_binlog_pos\` int(10) unsigned DEFAULT '0'"
# different TiDB will output DEFAULT 0 or DEFAULT '0'
check_contains "\`exit_safe_binlog_pos\` int(10) unsigned DEFAULT "
check_contains "\`exit_safe_binlog_gtid\` text DEFAULT NULL"

run_sql_file $cur/data/db1.increment.sql $MYSQL_HOST1 $MYSQL_PORT1 $MYSQL_PASSWORD1
Expand Down
4 changes: 3 additions & 1 deletion tests/shardddl1/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,11 @@ function DM_027_CASE() {
run_sql_source1 "insert into ${shardddl1}.${tb2} values (4)"
run_sql_source1 "insert into ${shardddl1}.${tb3} values (5,6)"
# we now haven't checked table struct when create sharding table
# there should be a error message like "Unknown column 'val' in 'field list'", "unknown column val"
# but different TiDB version output different message. so we only roughly match here
run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"query-status test" \
"Unknown column 'val' in 'field list'" 1
"nknown column" 1 # ignore case for first letter
}

function DM_027() {
Expand Down

0 comments on commit e6ca256

Please sign in to comment.