From 03406fcb6cfb828e58d136aab748b60b938099ad Mon Sep 17 00:00:00 2001 From: YaacovHazan <31382944+YaacovHazan@users.noreply.github.com> Date: Tue, 9 Nov 2021 22:37:18 +0200 Subject: [PATCH] fix short timeout in replication short read tests (#9763) In both tests, "diskless loading short read" and "diskless loading short read with module", the timeout of waiting for the replica to respond to a short read and log it, is too short. Also, add --dump-logs in runtest-moduleapi for valgrind runs. --- .github/workflows/daily.yml | 30 +++++++++++++++--------------- tests/integration/replication.tcl | 2 +- tests/unit/moduleapi/testrdb.tcl | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 8d01f62e5..1e31c0b6a 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -55,7 +55,7 @@ jobs: run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - name: module api test if: true && !contains(github.event.inputs.skiptests, 'modules') - run: ./runtest-moduleapi --verbose ${{github.event.inputs.test_args}} + run: ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - name: sentinel tests if: true && !contains(github.event.inputs.skiptests, 'sentinel') run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} @@ -88,7 +88,7 @@ jobs: run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - name: module api test if: true && !contains(github.event.inputs.skiptests, 'modules') - run: ./runtest-moduleapi --verbose ${{github.event.inputs.test_args}} + run: ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - name: sentinel tests if: true && !contains(github.event.inputs.skiptests, 'sentinel') run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} @@ -119,7 +119,7 @@ jobs: run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - name: module api test if: true && !contains(github.event.inputs.skiptests, 'modules') - run: ./runtest-moduleapi --verbose ${{github.event.inputs.test_args}} + run: ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - name: sentinel tests if: true && !contains(github.event.inputs.skiptests, 'sentinel') run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} @@ -154,7 +154,7 @@ jobs: if: true && !contains(github.event.inputs.skiptests, 'modules') run: | make -C tests/modules 32bit # the script below doesn't have an argument, we must build manually ahead of time - ./runtest-moduleapi --verbose ${{github.event.inputs.test_args}} + ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - name: sentinel tests if: true && !contains(github.event.inputs.skiptests, 'sentinel') run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} @@ -193,8 +193,8 @@ jobs: - name: module api test if: true && !contains(github.event.inputs.skiptests, 'modules') run: | - ./runtest-moduleapi --verbose --tls ${{github.event.inputs.test_args}} - ./runtest-moduleapi --verbose ${{github.event.inputs.test_args}} + ./runtest-moduleapi --verbose --tls --dump-logs ${{github.event.inputs.test_args}} + ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - name: sentinel tests if: true && !contains(github.event.inputs.skiptests, 'sentinel') run: | @@ -257,7 +257,7 @@ jobs: run: ./runtest --valgrind --verbose --clients 1 --dump-logs ${{github.event.inputs.test_args}} - name: module api test if: true && !contains(github.event.inputs.skiptests, 'modules') - run: ./runtest-moduleapi --valgrind --no-latency --verbose --clients 1 ${{github.event.inputs.test_args}} + run: ./runtest-moduleapi --valgrind --no-latency --verbose --clients 1 --dump-logs ${{github.event.inputs.test_args}} - name: unittest run: | valgrind --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.txt ./src/redis-server test all @@ -288,7 +288,7 @@ jobs: run: ./runtest --valgrind --verbose --clients 1 --dump-logs ${{github.event.inputs.test_args}} - name: module api test if: true && !contains(github.event.inputs.skiptests, 'modules') - run: ./runtest-moduleapi --valgrind --no-latency --verbose --clients 1 ${{github.event.inputs.test_args}} + run: ./runtest-moduleapi --valgrind --no-latency --verbose --clients 1 --dump-logs ${{github.event.inputs.test_args}} test-centos7-jemalloc: runs-on: ubuntu-latest @@ -316,7 +316,7 @@ jobs: run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - name: module api test if: true && !contains(github.event.inputs.skiptests, 'modules') - run: ./runtest-moduleapi --verbose ${{github.event.inputs.test_args}} + run: ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - name: sentinel tests if: true && !contains(github.event.inputs.skiptests, 'sentinel') run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} @@ -356,8 +356,8 @@ jobs: - name: module api test if: true && !contains(github.event.inputs.skiptests, 'modules') run: | - ./runtest-moduleapi --verbose --tls ${{github.event.inputs.test_args}} - ./runtest-moduleapi --verbose ${{github.event.inputs.test_args}} + ./runtest-moduleapi --verbose --tls --dump-logs ${{github.event.inputs.test_args}} + ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - name: sentinel tests if: true && !contains(github.event.inputs.skiptests, 'sentinel') run: | @@ -390,7 +390,7 @@ jobs: run: ./runtest --accurate --verbose --no-latency --dump-logs ${{github.event.inputs.test_args}} - name: module api test if: true && !contains(github.event.inputs.skiptests, 'modules') - run: ./runtest-moduleapi --verbose ${{github.event.inputs.test_args}} + run: ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - name: sentinel tests if: true && !contains(github.event.inputs.skiptests, 'sentinel') run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} @@ -421,7 +421,7 @@ jobs: run: > gmake || exit 1 ; if echo "${{github.event.inputs.skiptests}}" | grep -vq redis ; then ./runtest --accurate --verbose --no-latency --dump-logs ${{github.event.inputs.test_args}} || exit 1 ; fi ; - if echo "${{github.event.inputs.skiptests}}" | grep -vq modules ; then MAKE=gmake ./runtest-moduleapi --verbose ${{github.event.inputs.test_args}} || exit 1 ; fi ; + if echo "${{github.event.inputs.skiptests}}" | grep -vq modules ; then MAKE=gmake ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} || exit 1 ; fi ; if echo "${{github.event.inputs.skiptests}}" | grep -vq sentinel ; then ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} || exit 1 ; fi ; if echo "${{github.event.inputs.skiptests}}" | grep -vq cluster ; then ./runtest-cluster ${{github.event.inputs.cluster_test_args}} || exit 1 ; fi ; @@ -450,7 +450,7 @@ jobs: run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - name: module api test if: true && !contains(github.event.inputs.skiptests, 'modules') - run: ./runtest-moduleapi --verbose ${{github.event.inputs.test_args}} + run: ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - name: sentinel tests if: true && !contains(github.event.inputs.skiptests, 'sentinel') run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} @@ -483,7 +483,7 @@ jobs: run: ./runtest --accurate --verbose --dump-logs ${{github.event.inputs.test_args}} - name: module api test if: true && !contains(github.event.inputs.skiptests, 'modules') - run: ./runtest-moduleapi --verbose ${{github.event.inputs.test_args}} + run: ./runtest-moduleapi --verbose --dump-logs ${{github.event.inputs.test_args}} - name: sentinel tests if: true && !contains(github.event.inputs.skiptests, 'sentinel') run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl index 06f079d34..fe146932a 100644 --- a/tests/integration/replication.tcl +++ b/tests/integration/replication.tcl @@ -672,7 +672,7 @@ test {diskless loading short read} { # kill the replica connection on the master set killed [$master client kill type replica] - set res [wait_for_log_messages -1 {"*Internal error in RDB*" "*Finished with success*" "*Successful partial resynchronization*"} $loglines 1000 1] + set res [wait_for_log_messages -1 {"*Internal error in RDB*" "*Finished with success*" "*Successful partial resynchronization*"} $loglines 500 10] if {$::verbose} { puts $res } set log_text [lindex $res 0] set loglines [lindex $res 1] diff --git a/tests/unit/moduleapi/testrdb.tcl b/tests/unit/moduleapi/testrdb.tcl index 12d6a2a77..33ec54e04 100644 --- a/tests/unit/moduleapi/testrdb.tcl +++ b/tests/unit/moduleapi/testrdb.tcl @@ -98,7 +98,7 @@ tags "modules" { # kill the replica connection on the master set killed [$master client kill type replica] - set res [wait_for_log_messages -1 {"*Internal error in RDB*" "*Finished with success*" "*Successful partial resynchronization*"} $loglines 1000 1] + set res [wait_for_log_messages -1 {"*Internal error in RDB*" "*Finished with success*" "*Successful partial resynchronization*"} $loglines 500 10] if {$::verbose} { puts $res } set log_text [lindex $res 0] set loglines [lindex $res 1]