summaryrefslogtreecommitdiff
path: root/tests/integration/replication-4.tcl
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2023-04-12 09:19:21 +0300
committerGitHub <noreply@github.com>2023-04-12 09:19:21 +0300
commit997fa41e99271cc5c3a79e9bf8a1332b3d9ab0c2 (patch)
treee9518b5a84c42b73ba39b735bc4d11010adc3d70 /tests/integration/replication-4.tcl
parent45b8eea19f3e2491dec669f0745e513a4c9d7329 (diff)
downloadredis-997fa41e99271cc5c3a79e9bf8a1332b3d9ab0c2.tar.gz
Attempt to solve MacOS CI issues in GH Actions (#12013)
The MacOS CI in github actions often hangs without any logs. GH argues that it's due to resource utilization, either running out of disk space, memory, or CPU starvation, and thus the runner is terminated. This PR contains multiple attempts to resolve this: 1. introducing pause_process instead of SIGSTOP, which waits for the process to stop before resuming the test, possibly resolving race conditions in some tests, this was a suspect since there was one test that could result in an infinite loop in that case, in practice this didn't help, but still a good idea to keep. 2. disable the `save` config in many tests that don't need it, specifically ones that use heavy writes and could create large files. 3. change the `populate` proc to use short pipeline rather than an infinite one. 4. use `--clients 1` in the macos CI so that we don't risk running multiple resource demanding tests in parallel. 5. enable `--verbose` to be repeated to elevate verbosity and print more info to stdout when a test or a server starts.
Diffstat (limited to 'tests/integration/replication-4.tcl')
-rw-r--r--tests/integration/replication-4.tcl12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/integration/replication-4.tcl b/tests/integration/replication-4.tcl
index f772eccb2..867ef364e 100644
--- a/tests/integration/replication-4.tcl
+++ b/tests/integration/replication-4.tcl
@@ -1,5 +1,5 @@
-start_server {tags {"repl network external:skip singledb:skip"}} {
- start_server {} {
+start_server {tags {"repl network external:skip singledb:skip"} overrides {save {}}} {
+ start_server { overrides {save {}}} {
set master [srv -1 client]
set master_host [srv -1 host]
@@ -104,7 +104,7 @@ start_server {tags {"repl external:skip"}} {
assert_equal OK [$master set foo 123]
assert_equal OK [$master eval "return redis.call('set','foo',12345)" 0]
# Killing a slave to make it become a lagged slave.
- exec kill -SIGSTOP [srv 0 pid]
+ pause_process [srv 0 pid]
# Waiting for slave kill.
wait_for_condition 100 100 {
[catch {$master set foo 123}] != 0
@@ -113,7 +113,7 @@ start_server {tags {"repl external:skip"}} {
}
assert_error "*NOREPLICAS*" {$master set foo 123}
assert_error "*NOREPLICAS*" {$master eval "return redis.call('set','foo',12345)" 0}
- exec kill -SIGCONT [srv 0 pid]
+ resume_process [srv 0 pid]
}
}
}
@@ -146,12 +146,12 @@ start_server {tags {"repl external:skip"}} {
$master debug set-active-expire 0
$master set k 1 px $px_ms
wait_for_ofs_sync $master $slave
- exec kill -SIGSTOP [srv 0 pid]
+ pause_process [srv 0 pid]
$master incr k
after [expr $px_ms + 1]
# Stopping the replica for one second to makes sure the INCR arrives
# to the replica after the key is logically expired.
- exec kill -SIGCONT [srv 0 pid]
+ resume_process [srv 0 pid]
wait_for_ofs_sync $master $slave
# Check that k is logically expired but is present in the replica.
set res [$slave exists k]