Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*(both): replace set -e to set -ru and disable some unstable test #4160

Merged
merged 10 commits into from
Dec 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eu
ulimit -n 1000000

DEPLOY_DIR={{ deploy_dir }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eu
ulimit -n 1000000

DEPLOY_DIR={{ deploy_dir }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eu
ulimit -n 1000000

DEPLOY_DIR={{ deploy_dir }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eu
ulimit -n 1000000

DEPLOY_DIR={{ deploy_dir }}
Expand Down
2 changes: 1 addition & 1 deletion dm/dm/dm-ansible/roles/grafana/templates/run_grafana.sh.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eu
ulimit -n 1000000

# WARNING: This file was auto-generated. Do not edit!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eu
ulimit -n 1000000

DEPLOY_DIR={{ deploy_dir }}
Expand Down
2 changes: 1 addition & 1 deletion dm/dm/dm-ansible/roles/systemd/templates/start_role.sh.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eu

# WARNING: This file was auto-generated. Do not edit!
# All your edit might be overwritten!
Expand Down
2 changes: 1 addition & 1 deletion dm/dm/dm-ansible/roles/systemd/templates/stop_role.sh.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eu

# WARNING: This file was auto-generated. Do not edit!
# All your edit might be overwritten!
Expand Down
3 changes: 0 additions & 3 deletions dm/tests/others_integration_1.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
full_mode
dm_syncer
sequence_sharding_optimistic
sequence_sharding_removemeta
drop_column_with_index
gtid
only_dml
adjust_gtid
checkpoint_transaction
lightning_mode
downstream_diff_index
slow_relay_writer
sync_collation
2 changes: 1 addition & 1 deletion tests/integration_tests/_utils/run_sql_file
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# parameter 2: database host
# parameter 3: database port

set -e
set -eu

echo "[$(date)] Executing SQL: $1" >"$OUT_DIR/sql_res.$TEST_NAME.txt"
mysql -uroot -h$2 -P$3 --default-character-set utf8mb4 -vv <"$1" >>"$OUT_DIR/sql_res.$TEST_NAME.txt"
2 changes: 1 addition & 1 deletion tests/integration_tests/autorandom/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/availability/capture.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/availability/owner.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/availability/processor.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/availability/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/bank/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/batch_add_table/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/cdc/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/changefeed_auto_stop/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/changefeed_error/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/changefeed_fast_fail/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/changefeed_finish/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/changefeed_pause_resume/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/changefeed_reconstruct/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/cli/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/clustered_index/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/common_1/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/consistent_replicate_nfs/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/consistent_replicate_s3/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/cyclic_ab/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/cyclic_abc/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/ddl_attributes/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/ddl_puller_lag/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/ddl_reentrant/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/ddl_sequence/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/drop_many_tables/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/force_replicate_table/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/gc_safepoint/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down Expand Up @@ -93,14 +93,14 @@ function run() {
run_kafka_consumer $WORK_DIR "kafka://127.0.0.1:9092/$TOPIC_NAME?protocol=open-protocol&partition-num=4&version=${KAFKA_VERSION}&max-message-bytes=10485760"
fi

pd_cluster_id=$(curl -s $pd_addr/pd/api/v1/cluster | grep -oE "id\":\s[0-9]+" | grep -oE "[0-9]+")
clear_gc_worker_safepoint $pd_addr $pd_cluster_id

run_sql "CREATE DATABASE gc_safepoint;" ${UP_TIDB_HOST} ${UP_TIDB_PORT}
run_sql "CREATE table gc_safepoint.simple(id int primary key auto_increment, val int);" ${UP_TIDB_HOST} ${UP_TIDB_PORT}
run_sql "INSERT INTO gc_safepoint.simple VALUES (),();" ${UP_TIDB_HOST} ${UP_TIDB_PORT}
check_sync_diff $WORK_DIR $CUR/conf/diff_config.toml

pd_cluster_id=$(curl -s $pd_addr/pd/api/v1/cluster | grep -oE "id\":\s[0-9]+" | grep -oE "[0-9]+")
start_safepoint=$(get_safepoint $pd_addr $pd_cluster_id)
ensure $MAX_RETRIES check_safepoint_forward $pd_addr $pd_cluster_id $start_safepoint

Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/generate_column/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/http_api/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/kafka_big_messages/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/kafka_messages/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/kafka_sink_error_resume/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/kill_owner_with_ddl/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/kv_client_stream_reconnect/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/many_pk_or_uk/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -eu

CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $CUR/../_utils/test_prepare
Expand Down
Loading