Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.

Commit

Permalink
Redis test: vaoid two false positives while running under valgrind.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Dec 20, 2011
1 parent b760888 commit 2e68921
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions tests/integration/aof.tcl
Expand Up @@ -32,8 +32,19 @@ tags {"aof"} {

start_server_aof [list dir $server_path] {
test "Unfinished MULTI: Server should have logged an error" {
set result [exec cat [dict get $srv stdout] | tail -n1]
assert_match "*Unexpected end of file reading the append only file*" $result
set pattern "*Unexpected end of file reading the append only file*"
set retry 10
while {$retry} {
set result [exec cat [dict get $srv stdout] | tail -n1]
if {[string match $pattern $result]} {
break
}
incr retry -1
after 1000
}
if {$retry == 0} {
error "assertion:expected error not found on config file"
}
}
}

Expand All @@ -45,8 +56,19 @@ tags {"aof"} {

start_server_aof [list dir $server_path] {
test "Short read: Server should have logged an error" {
set result [exec cat [dict get $srv stdout] | tail -n1]
assert_match "*Bad file format reading the append only file*" $result
set pattern "*Bad file format reading the append only file*"
set retry 10
while {$retry} {
set result [exec cat [dict get $srv stdout] | tail -n1]
if {[string match $pattern $result]} {
break
}
incr retry -1
after 1000
}
if {$retry == 0} {
error "assertion:expected error not found on config file"
}
}
}

Expand Down

0 comments on commit 2e68921

Please sign in to comment.