Skip to content

Commit

Permalink
refactor:Increase the wait time for the slaveof command.
Browse files Browse the repository at this point in the history
  • Loading branch information
dingxiaoshuai123 committed Oct 26, 2023
1 parent b881b70 commit a02dc50
Show file tree
Hide file tree
Showing 6 changed files with 434 additions and 1,087 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/pika.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,14 @@ jobs:
chmod +x ../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
- name: Run Go E2E Tests
working-directory: ${{ github.workspace }}/build
run: |
cd ../tests/integration/
chmod +x integrate_test.sh
sh integrate_test.sh
build_on_centos:
runs-on: ubuntu-latest
container:
Expand All @@ -89,7 +84,7 @@ jobs:
steps:
- name: Install deps
run: |
yum install -y wget git autoconf centos-release-scl
yum install -y wget git autoconf centos-release-scl gcc
yum install -y devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-make devtoolset-10-bin-util
yum install -y llvm-toolset-7 llvm-toolset-7-clang tcl which python3
python3 -m pip install --upgrade pip
Expand Down Expand Up @@ -134,11 +129,12 @@ jobs:
chmod +x ../tests/integration/start_master_and_slave.sh
../tests/integration/start_master_and_slave.sh
- name: Run Python E2E Tests
- name: Run Go E2E Tests
working-directory: ${{ github.workspace }}/build
run: |
python3 ../tests/integration/pika_replication_test.py
python3 ../tests/unit/Blpop_Brpop_test.py
cd ../tests/integration/
chmod +x integrate_test.sh
sh integrate_test.sh
build_on_macos:
runs-on: macos-latest
Expand Down Expand Up @@ -193,12 +189,6 @@ jobs:
chmod +x ../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
- name: Run Go E2E Tests
working-directory: ${{ github.workspace }}/build
run: |
Expand Down
12 changes: 12 additions & 0 deletions tests/integration/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,15 @@ var _ = BeforeSuite(func() {
Expect(clientMaster.FlushDB(ctx).Err()).NotTo(HaveOccurred())
time.Sleep(5 * time.Second)
})

var _ = AfterSuite(func() {
ctx := context.TODO()
clientMaster := redis.NewClient(pikaOptions1())
clientSlave := redis.NewClient(pikaOptions2())
cleanEnv(ctx, clientMaster, clientSlave)
Expect(clientMaster.FlushDB(ctx).Err()).NotTo(HaveOccurred())
Expect(clientSlave.FlushDB(ctx).Err()).NotTo(HaveOccurred())
Expect(clientMaster.Close()).NotTo(HaveOccurred())
Expect(clientSlave.Close()).NotTo(HaveOccurred())
time.Sleep(5 * time.Second)
})
Loading

0 comments on commit a02dc50

Please sign in to comment.