summaryrefslogtreecommitdiff
path: root/tests/support
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-07-10 11:24:59 +0200
committerantirez <antirez@gmail.com>2014-07-10 11:25:12 +0200
commite01195e90d1afd52b62071029cea5702eba4c3c3 (patch)
treeb136828819b9bca0cf4c34e5dfe52a5ea71b39aa /tests/support
parent067e365042f8d26feff0bf06f8caff1bd9abbbce (diff)
downloadredis-e01195e90d1afd52b62071029cea5702eba4c3c3.tar.gz
Test: AOF rewrite during write load.
Diffstat (limited to 'tests/support')
-rw-r--r--tests/support/util.tcl12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/support/util.tcl b/tests/support/util.tcl
index 8ef6e1bc0..7774dd99a 100644
--- a/tests/support/util.tcl
+++ b/tests/support/util.tcl
@@ -359,3 +359,15 @@ proc colorstr {color str} {
return $str
}
}
+
+# Execute a background process writing random data for the specified number
+# of seconds to the specified Redis instance.
+proc start_write_load {host port seconds} {
+ set tclsh [info nameofexecutable]
+ exec $tclsh tests/helpers/gen_write_load.tcl $host $port $seconds &
+}
+
+# Stop a process generating write load executed with start_write_load.
+proc stop_write_load {handle} {
+ catch {exec /bin/kill -9 $handle}
+}