Skip to content

Commit

Permalink
fix: some issues with the syntax specification of the master-slave sy…
Browse files Browse the repository at this point in the history
…nchronization test script (#1776)

* Fixed some issues with the syntax specification of the master-slave synchronization test script
  • Loading branch information
Mixficsol authored Jul 20, 2023
1 parent 4158969 commit 514d7ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/pika.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions tests/integration/start_master_and_slave.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 514d7ab

Please sign in to comment.