diff --git a/ci/scripts/e2e-kafka-sink-test.sh b/ci/scripts/e2e-kafka-sink-test.sh index 98439b5a215d1..14bf1b2711936 100755 --- a/ci/scripts/e2e-kafka-sink-test.sh +++ b/ci/scripts/e2e-kafka-sink-test.sh @@ -18,7 +18,7 @@ sleep 2 # test append-only kafka sink echo "testing append-only kafka sink" diff ./e2e_test/sink/kafka/append_only1.result \ -<((rpk topic consume test-rw-sink-append-only --offset start --format '%v' --num 10 | sort) 2> /dev/null) +<((rpk topic consume test-rw-sink-append-only --offset start --format '%v\n' --num 10 | sort) 2> /dev/null) if [ $? -ne 0 ]; then echo "The output for append-only sink is not as expected." exit 1 @@ -27,7 +27,7 @@ fi # test upsert kafka sink echo "testing upsert kafka sink" diff ./e2e_test/sink/kafka/upsert1.result \ -<((rpk topic consume test-rw-sink-upsert --offset start --format '%k\t%v' --num 10 | sort) 2> /dev/null) +<((rpk topic consume test-rw-sink-upsert --offset start --format '%k\t%v\n' --num 10 | sort) 2> /dev/null) if [ $? -ne 0 ]; then echo "The output for upsert sink is not as expected." exit 1 @@ -36,7 +36,7 @@ fi # test upsert kafka sink with schema echo "testing upsert kafka sink with schema" diff ./e2e_test/sink/kafka/upsert_schema1.result \ -<((rpk topic consume test-rw-sink-upsert-schema --offset start --format '%k\t%v' --num 10 | sort) 2> /dev/null) +<((rpk topic consume test-rw-sink-upsert-schema --offset start --format '%k\t%v\n' --num 10 | sort) 2> /dev/null) if [ $? -ne 0 ]; then echo "The output for upsert sink with schema is not as expected." exit 1 @@ -44,7 +44,7 @@ fi # test debezium kafka sink echo "testing debezium kafka sink" -(rpk topic consume test-rw-sink-debezium --offset start --format '%k\t%v' --num 10 | sort) > ./e2e_test/sink/kafka/debezium1.tmp.result 2> /dev/null +(rpk topic consume test-rw-sink-debezium --offset start --format '%k\t%v\n' --num 10 | sort) > ./e2e_test/sink/kafka/debezium1.tmp.result 2> /dev/null python3 e2e_test/sink/kafka/debezium.py e2e_test/sink/kafka/debezium1.result e2e_test/sink/kafka/debezium1.tmp.result if [ $? -ne 0 ]; then echo "The output for debezium sink is not as expected." @@ -61,7 +61,7 @@ psql -h localhost -p 4566 -d dev -U root -c "update t_kafka set v_varchar = '', # test append-only kafka sink after update echo "testing append-only kafka sink after updating data" diff ./e2e_test/sink/kafka/append_only2.result \ -<((rpk topic consume test-rw-sink-append-only --offset start --format '%v' --num 11 | sort) 2> /dev/null) +<((rpk topic consume test-rw-sink-append-only --offset start --format '%v\n' --num 11 | sort) 2> /dev/null) if [ $? -ne 0 ]; then echo "The output for append-only sink after update is not as expected." exit 1 @@ -70,7 +70,7 @@ fi # test upsert kafka sink after update echo "testing upsert kafka sink after updating data" diff ./e2e_test/sink/kafka/upsert2.result \ -<((rpk topic consume test-rw-sink-upsert --offset start --format '%k\t%v' --num 11 | sort) 2> /dev/null) +<((rpk topic consume test-rw-sink-upsert --offset start --format '%k\t%v\n' --num 11 | sort) 2> /dev/null) if [ $? -ne 0 ]; then echo "The output for upsert sink after update is not as expected." exit 1 @@ -79,7 +79,7 @@ fi # test upsert kafka sink with schema after update echo "testing upsert kafka sink with schema after updating data" diff ./e2e_test/sink/kafka/upsert_schema2.result \ -<((rpk topic consume test-rw-sink-upsert-schema --offset start --format '%k\t%v' --num 11 | sort) 2> /dev/null) +<((rpk topic consume test-rw-sink-upsert-schema --offset start --format '%k\t%v\n' --num 11 | sort) 2> /dev/null) if [ $? -ne 0 ]; then echo "The output for upsert sink with schema is not as expected." exit 1 @@ -87,7 +87,7 @@ fi # test debezium kafka sink after update echo "testing debezium kafka sink after updating data" -(rpk topic consume test-rw-sink-debezium --offset start --format '%k\t%v' --num 11 | sort) > ./e2e_test/sink/kafka/debezium2.tmp.result 2> /dev/null +(rpk topic consume test-rw-sink-debezium --offset start --format '%k\t%v\n' --num 11 | sort) > ./e2e_test/sink/kafka/debezium2.tmp.result 2> /dev/null python3 e2e_test/sink/kafka/debezium.py e2e_test/sink/kafka/debezium2.result e2e_test/sink/kafka/debezium2.tmp.result if [ $? -ne 0 ]; then echo "The output for debezium sink after update is not as expected." @@ -100,7 +100,7 @@ fi # test without-snapshot kafka sink echo "testing without-snapshot kafka sink" diff ./e2e_test/sink/kafka/without_snapshot.result \ -<((rpk topic consume test-rw-sink-without-snapshot --offset start --format '%v' --num 3 | sort) 2> /dev/null) +<((rpk topic consume test-rw-sink-without-snapshot --offset start --format '%v\n' --num 3 | sort) 2> /dev/null) if [ $? -ne 0 ]; then echo "The output for append-only sink is not as expected." exit 1 @@ -113,7 +113,7 @@ psql -h localhost -p 4566 -d dev -U root -c "delete from t_kafka where id = 1;" # test upsert kafka sink after delete echo "testing upsert kafka sink after deleting data" diff ./e2e_test/sink/kafka/upsert3.result \ -<((rpk topic consume test-rw-sink-upsert --offset start --format '%k\t%v' --num 12 | sort) 2> /dev/null) +<((rpk topic consume test-rw-sink-upsert --offset start --format '%k\t%v\n' --num 12 | sort) 2> /dev/null) if [ $? -ne 0 ]; then echo "The output for upsert sink after update is not as expected." exit 1 @@ -122,7 +122,7 @@ fi # test upsert kafka sink with schema after delete echo "testing upsert kafka sink with schema after deleting data" diff ./e2e_test/sink/kafka/upsert_schema3.result \ -<((rpk topic consume test-rw-sink-upsert-schema --offset start --format '%k\t%v' --num 12 | sort) 2> /dev/null) +<((rpk topic consume test-rw-sink-upsert-schema --offset start --format '%k\t%v\n' --num 12 | sort) 2> /dev/null) if [ $? -ne 0 ]; then echo "The output for upsert sink with schema is not as expected." exit 1 @@ -130,7 +130,7 @@ fi # test debezium kafka sink after delete echo "testing debezium kafka sink after deleting data" -(rpk topic consume test-rw-sink-debezium --offset start --format '%k\t%v' --num 13 | sort) > ./e2e_test/sink/kafka/debezium3.tmp.result 2> /dev/null +(rpk topic consume test-rw-sink-debezium --offset start --format '%k\t%v\n' --num 13 | sort) > ./e2e_test/sink/kafka/debezium3.tmp.result 2> /dev/null python3 e2e_test/sink/kafka/debezium.py e2e_test/sink/kafka/debezium3.result e2e_test/sink/kafka/debezium3.tmp.result if [ $? -ne 0 ]; then echo "The output for debezium sink after delete is not as expected."