From 0927a0dd243c641d5657c35bfac9a439b2d6956e Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Wed, 10 Nov 2021 19:39:26 +0200 Subject: [PATCH] Try solving test timeout on freebsd CI (#9768) First, avoid using --accurate on the freebsd CI, we only care about systematic issues there due to being different platform, but not accuracy Secondly, when looking at the test which timed out it seems silly and outdated: - it used KEYS to attempt to trigger lazy expiry, but KEYS doesn't do that anymore. - it used some hard coded sleeps rather than waiting for things to happen and exiting ASAP --- .github/workflows/daily.yml | 2 +- tests/integration/replication-3.tcl | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index ce2998069..26d7c1e9c 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -420,7 +420,7 @@ jobs: prepare: pkg install -y bash gmake lang/tcl86 lang/tclx 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 redis ; then ./runtest --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 --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 ; diff --git a/tests/integration/replication-3.tcl b/tests/integration/replication-3.tcl index 642b99a0c..32ec1a932 100644 --- a/tests/integration/replication-3.tcl +++ b/tests/integration/replication-3.tcl @@ -13,9 +13,18 @@ start_server {tags {"repl external:skip"}} { test {MASTER and SLAVE consistency with expire} { createComplexDataset r $numops useexpire - after 4000 ;# Make sure everything expired before taking the digest - r keys * ;# Force DEL syntesizing to slave - after 1000 ;# Wait another second. Now everything should be fine. + + # Make sure everything expired before taking the digest + # createComplexDataset uses max expire time of 2 seconds + wait_for_condition 50 100 { + 0 == [scan [regexp -inline {expires\=([\d]*)} [r -1 info keyspace]] expires=%d] + } else { + fail "expire didn't end" + } + + # make sure the replica got all the DELs + wait_for_ofs_sync [srv 0 client] [srv -1 client] + if {[r debug digest] ne [r -1 debug digest]} { set csv1 [csvdump r] set csv2 [csvdump {r -1}]