Skip to content

Commit

Permalink
tests: use normal mysql user in integration test (pingcap#1755)
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei authored May 18, 2021
1 parent d277506 commit f04762b
Show file tree
Hide file tree
Showing 47 changed files with 51 additions and 44 deletions.
3 changes: 3 additions & 0 deletions tests/_utils/start_tidb_cluster_impl
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ done

run_sql "update mysql.tidb set variable_value='60m' where variable_name='tikv_gc_life_time';" ${UP_TIDB_HOST} ${UP_TIDB_PORT}
run_sql "update mysql.tidb set variable_value='60m' where variable_name='tikv_gc_life_time';" ${DOWN_TIDB_HOST} ${DOWN_TIDB_PORT}
run_sql "CREATE user 'normal'@'%' identified by '123456';" ${DOWN_TIDB_HOST} ${DOWN_TIDB_PORT}
run_sql "GRANT select,insert,update,delete,index,create,drop,alter,create view ON *.* TO 'normal'@'%';" ${DOWN_TIDB_HOST} ${DOWN_TIDB_PORT}
run_sql "FLUSH privileges" ${DOWN_TIDB_HOST} ${DOWN_TIDB_PORT}

cat - >"$OUT_DIR/tiflash-config.toml" <<EOF
tmp_path = "${OUT_DIR}/tiflash/tmp"
Expand Down
2 changes: 1 addition & 1 deletion tests/autorandom/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function run() {
TOPIC_NAME="ticdc-autorandom-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
cdc cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/availability/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function prepare() {
run_sql "CREATE table test.availability2(id int primary key, val int);"
run_sql "CREATE table test.availability3(id int primary key, val int);"

run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="mysql://root@127.0.0.1:3306/"
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="mysql://normal:123456@127.0.0.1:3306/"
}

trap stop_tidb_cluster EXIT
Expand Down
2 changes: 1 addition & 1 deletion tests/batch_add_table/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function run() {
TOPIC_NAME="ticdc-batch-add-table-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/capture_session_done_during_task/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function run() {
TOPIC_NAME="ticdc-capture-session-done-during-task-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/?max-txn-row=1";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/?max-txn-row=1";;
esac
if [ "$SINK_TYPE" == "kafka" ]; then
run_kafka_consumer $WORK_DIR "kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&version=${KAFKA_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion tests/capture_suicide_while_balance_table/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function run() {
export GO_FAILPOINTS='github.com/pingcap/ticdc/cdc/sink/MySQLSinkHangLongTime=1*return(true)'
run_cdc_server --workdir $WORK_DIR --binary $CDC_BINARY --pd $pd_addr --logsuffix 2 --addr "127.0.0.1:8301"

SINK_URI="mysql://root@127.0.0.1:3306/?max-txn-row=1"
SINK_URI="mysql://normal:123456@127.0.0.1:3306/?max-txn-row=1"
changefeed_id=$(cdc cli changefeed create --pd=$pd_addr --sink-uri="$SINK_URI" 2>&1|tail -n2|head -n1|awk '{print $2}')

run_sql "CREATE DATABASE capture_suicide_while_balance_table;" ${UP_TIDB_HOST} ${UP_TIDB_PORT}
Expand Down
2 changes: 1 addition & 1 deletion tests/cdc/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function prepare() {
TOPIC_NAME="ticdc-cdc-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/changefeed_auto_stop/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function run() {
TOPIC_NAME="ticdc-changefeed-auto-stop-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
changefeedid=$(cdc cli changefeed create --pd="http://${UP_PD_HOST_1}:${UP_PD_PORT_1}" --start-ts=$start_ts --sink-uri="$SINK_URI" 2>&1|tail -n2|head -n1|awk '{print $2}')
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/changefeed_error/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function run() {
TOPIC_NAME="ticdc-sink-retry-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/?max-txn-row=1";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/?max-txn-row=1";;
esac
changefeedid=$(cdc cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI" 2>&1|tail -n2|head -n1|awk '{print $2}')
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/changefeed_finish/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function run() {
TOPIC_NAME="ticdc-changefeed-pause-resume-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/?max-txn-row=1";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/?max-txn-row=1";;
esac
if [ "$SINK_TYPE" == "kafka" ]; then
run_kafka_consumer $WORK_DIR "kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&version=${KAFKA_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion tests/changefeed_pause_resume/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function run() {
TOPIC_NAME="ticdc-changefeed-pause-resume-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/?max-txn-row=1";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/?max-txn-row=1";;
esac
if [ "$SINK_TYPE" == "kafka" ]; then
run_kafka_consumer $WORK_DIR "kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&version=${KAFKA_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion tests/changefeed_reconstruct/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function run() {
TOPIC_NAME="ticdc-changefeed-reconstruct-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/?max-txn-row=1";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/?max-txn-row=1";;
esac
if [ "$SINK_TYPE" == "kafka" ]; then
run_kafka_consumer $WORK_DIR "kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&version=${KAFKA_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion tests/cli/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function run() {
TOPIC_NAME="ticdc-cli-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac

uuid="custom-changefeed-name"
Expand Down
2 changes: 1 addition & 1 deletion tests/clustered_index/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function run() {
TOPIC_NAME="ticdc-clustered-index-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
cdc cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 2 additions & 0 deletions tests/common_1/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ function run() {

run_cdc_server --workdir $WORK_DIR --binary $CDC_BINARY

# this test contains `recover table`, which requires super privilege, so we
# can't use the normal user
TOPIC_NAME="ticdc-common-1-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
Expand Down
2 changes: 1 addition & 1 deletion tests/ddl_puller_lag/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function prepare() {
TOPIC_NAME="ticdc-ddl-puller-lag-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka+ssl://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-client-id=ddl_puller_lag&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql+ssl://root@127.0.0.1:3306/";;
*) SINK_URI="mysql+ssl://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 2 additions & 0 deletions tests/ddl_reentrant/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ function complete_ddls() {
}

changefeedid=""
# this test contains `recover table`, which requires super privilege, so we
# can't use the normal user
SINK_URI="mysql://root@127.0.0.1:3306/"

function check_ts_forward() {
Expand Down
2 changes: 1 addition & 1 deletion tests/ddl_sequence/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function run() {
TOPIC_NAME="ticdc-ddl-sequence-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/drop_many_tables/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function run() {
TOPIC_NAME="ticdc-drop-tables-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/force_replicate_table/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function run() {
TOPIC_NAME="ticdc-force_replicate_table-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/?safe-mode=true";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/?safe-mode=true";;
esac
cdc cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI" --config $CUR/conf/changefeed.toml
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/gc_safepoint/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function run() {
TOPIC_NAME="ticdc-gc-safepoint-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/?max-txn-row=1";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/?max-txn-row=1";;
esac
if [ "$SINK_TYPE" == "kafka" ]; then
run_kafka_consumer $WORK_DIR "kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&version=${KAFKA_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion tests/generate_column/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function run() {
TOPIC_NAME="ticdc-generate-column-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/kill_owner_with_ddl/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function run() {
cd $WORK_DIR

pd_addr="http://$UP_PD_HOST_1:$UP_PD_PORT_1"
SINK_URI="mysql://root@127.0.0.1:3306/?max-txn-row=1"
SINK_URI="mysql://normal:123456@127.0.0.1:3306/?max-txn-row=1"

run_cdc_server --workdir $WORK_DIR --binary $CDC_BINARY --addr "127.0.0.1:8300" --pd $pd_addr
cdc cli changefeed create --pd=$pd_addr --sink-uri="$SINK_URI"
Expand Down
2 changes: 1 addition & 1 deletion tests/kv_client_stream_reconnect/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function run() {
TOPIC_NAME="kv-client-stream-reconnect-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/?max-txn-row=1";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/?max-txn-row=1";;
esac
if [ "$SINK_TYPE" == "kafka" ]; then
run_kafka_consumer $WORK_DIR "kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&version=${KAFKA_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion tests/many_pk_or_uk/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function prepare() {
TOPIC_NAME="ticdc-many-pk-or-uk-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/move_table/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function run() {
TOPIC_NAME="ticdc-move-table-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/?max-txn-row=1";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/?max-txn-row=1";;
esac

run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
Expand Down
2 changes: 1 addition & 1 deletion tests/multi_capture/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function run() {
TOPIC_NAME="ticdc-multi-capture-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/multi_source/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function prepare() {
TOPIC_NAME="ticdc-multi-source-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/new_ci_collation/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function run() {
TOPIC_NAME="ticdc-new_ci_collation-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/?safe-mode=true";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/?safe-mode=true";;
esac
cdc cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI" --config $CUR/conf/changefeed.toml
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/owner_remove_table_error/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function run() {
cd $WORK_DIR

pd_addr="http://$UP_PD_HOST_1:$UP_PD_PORT_1"
SINK_URI="mysql://root@127.0.0.1:3306/?max-txn-row=1";
SINK_URI="mysql://normal:123456@127.0.0.1:3306/?max-txn-row=1";

export GO_FAILPOINTS='github.com/pingcap/ticdc/cdc/OwnerRemoveTableError=1*return(true)'
run_cdc_server --workdir $WORK_DIR --binary $CDC_BINARY --addr "127.0.0.1:8300" --pd $pd_addr
Expand Down
2 changes: 1 addition & 1 deletion tests/partition_table/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function run() {
TOPIC_NAME="ticdc-partition-table-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/processor_err_chan/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function run() {
TOPIC_NAME="ticdc-processor-err-chan-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/?max-txn-row=1";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/?max-txn-row=1";;
esac
if [ "$SINK_TYPE" == "kafka" ]; then
run_kafka_consumer $WORK_DIR "kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&version=${KAFKA_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion tests/processor_panic/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function prepare() {
TOPIC_NAME="ticdc-processor-panic-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-client-id=cdc_test_processor_panic&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/processor_resolved_ts_fallback/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function run() {
TOPIC_NAME="ticdc-processor-resolved-ts-fallback-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://kafka01:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/processor_stop_delay/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function run() {
TOPIC_NAME="ticdc-processor-stop-delay-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/?max-txn-row=1";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/?max-txn-row=1";;
esac
if [ "$SINK_TYPE" == "kafka" ]; then
run_kafka_consumer $WORK_DIR "kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&version=${KAFKA_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion tests/region_merge/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function run() {
TOPIC_NAME="ticdc-region-merge-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/resolve_lock/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function prepare() {
TOPIC_NAME="ticdc-resolve-lock-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/tidb-txn-mode=pessimistic";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/tidb-txn-mode=pessimistic";;
esac
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/row_format/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function run() {
TOPIC_NAME="ticdc-row-format-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ "${1-}" = '--debug' ]; then

cdc server --log-file $WORK_DIR/cdc.log --log-level debug --addr 127.0.0.1:8300 > $WORK_DIR/stdout.log 2>&1 &
sleep 1
cdc cli changefeed create --sink-uri="mysql://root@127.0.0.1:3306/"
cdc cli changefeed create --sink-uri="mysql://normal:123456@127.0.0.1:3306/"

echo 'You may now debug from another terminal. Press [ENTER] to exit.'
read line
Expand Down
2 changes: 1 addition & 1 deletion tests/simple/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function prepare() {
TOPIC_NAME="ticdc-simple-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka+ssl://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-client-id=cdc_test_simple&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql+ssl://root@127.0.0.1:3306/";;
*) SINK_URI="mysql+ssl://normal:123456@127.0.0.1:3306/";;
esac
run_cdc_cli changefeed create --start-ts=$start_ts --sink-uri="$SINK_URI"
if [ "$SINK_TYPE" == "kafka" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/sink_hang/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function run() {
TOPIC_NAME="ticdc-sink-hang-test-$RANDOM"
case $SINK_TYPE in
kafka) SINK_URI="kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&kafka-version=${KAFKA_VERSION}";;
*) SINK_URI="mysql://root@127.0.0.1:3306/?max-txn-row=1";;
*) SINK_URI="mysql://normal:123456@127.0.0.1:3306/?max-txn-row=1";;
esac
if [ "$SINK_TYPE" == "kafka" ]; then
run_kafka_consumer $WORK_DIR "kafka://127.0.0.1:9092/$TOPIC_NAME?partition-num=4&version=${KAFKA_VERSION}"
Expand Down
Loading

0 comments on commit f04762b

Please sign in to comment.