From ce1f242c3d78caa00546dc15c57eccd35970c779 Mon Sep 17 00:00:00 2001 From: Mixficsol <838844609@qq.com> Date: Thu, 20 Jul 2023 22:31:31 +0800 Subject: [PATCH] fix: some issues with the syntax specification of the master-slave synchronization test script (#1776) * Fixed some issues with the syntax specification of the master-slave synchronization test script --- .github/workflows/pika.yml | 10 ++++++++-- tests/integration/start_master_and_slave.sh | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index cf6dcd4187..a8026bfc7a 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -158,7 +158,7 @@ jobs: run: | cd ${{github.workspace}} export CC=/usr/local/opt/gcc@10/bin/gcc-10 - cmake -B build -S . -DCMAKE_C_COMPILER=/usr/local/opt/gcc@10/bin/gcc-10 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + cmake -B ${{github.workspace}}/build -S . -DCMAKE_C_COMPILER=/usr/local/opt/gcc@10/bin/gcc-10 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} # - name: Test @@ -178,5 +178,11 @@ jobs: run: | cd ${{github.workspace}}/build chmod +x ../tests/integration/start_master_and_slave.sh - ../tests/integration/start_master_and_slave.sh + ../tests/integration/start_master_and_slave.sh + + - name: Run Python E2E Tests + working-directory: ${{github.workspace}}/build + run: | + python3 ../tests/integration/pika_replication_test.py + python3 ../tests/unit/Blpop_Brpop_test.py diff --git a/tests/integration/start_master_and_slave.sh b/tests/integration/start_master_and_slave.sh index 80b054176d..ed2923d19f 100644 --- a/tests/integration/start_master_and_slave.sh +++ b/tests/integration/start_master_and_slave.sh @@ -4,8 +4,8 @@ cp ../tests/conf/pika.conf ./pika_master.conf cp ../tests/conf/pika.conf ./pika_slave.conf mkdir slave_data -sed -i -e 's|databases : 1|databases : 2|' -e 's|#daemonize : yes|daemonize : yes|' ./pika_master.conf -sed -i -e 's|databases : 1|databases : 2|' -e 's|port : 9221|port : 9231|' -e 's|log-path : ./log/|log-path : ./slave_data/log/|' -e 's|db-path : ./db/|db-path : ./slave_data/db/|' -e 's|dump-path : ./dump/|dump-path : ./slave_data/dump/|' -e 's|pidfile : ./pika.pid|pidfile : ./slave_data/pika.pid|' -e 's|db-sync-path : ./dbsync/|db-sync-path : ./slave_data/dbsync/|' -e 's|#daemonize : yes|daemonize : yes|' ./pika_slave.conf +sed -i '' -e 's|databases : 1|databases : 2|' -e 's|#daemonize : yes|daemonize : yes|' ./pika_master.conf +sed -i '' -e 's|databases : 1|databases : 2|' -e 's|port : 9221|port : 9231|' -e 's|log-path : ./log/|log-path : ./slave_data/log/|' -e 's|db-path : ./db/|db-path : ./slave_data/db/|' -e 's|dump-path : ./dump/|dump-path : ./slave_data/dump/|' -e 's|pidfile : ./pika.pid|pidfile : ./slave_data/pika.pid|' -e 's|db-sync-path : ./dbsync/|db-sync-path : ./slave_data/dbsync/|' -e 's|#daemonize : yes|daemonize : yes|' ./pika_slave.conf ./pika -c ./pika_master.conf ./pika -c ./pika_slave.conf #ensure both master and slave are ready