提交 b3fdddfd 编写于 作者: A antirez

AOF tests fixed turning aof-load-truncated to no.

When aof-load-truncated option was introduced, with a default of "yes",
the past behavior of the server to abort with trunncated AOF changed, so
we need to explicitly configure the tests to abort with truncated AOF
by setting the option to no.
上级 670084b7
......@@ -30,7 +30,7 @@ tags {"aof"} {
append_to_aof [formatCommand set foo hello]
}
start_server_aof [list dir $server_path] {
start_server_aof [list dir $server_path aof-load-truncated no] {
test "Bad format: Server should have logged an error" {
set pattern "*Bad file format reading the append only file*"
set retry 10
......@@ -55,7 +55,7 @@ tags {"aof"} {
append_to_aof [formatCommand set bar world]
}
start_server_aof [list dir $server_path] {
start_server_aof [list dir $server_path aof-load-truncated no] {
test "Unfinished MULTI: Server should have logged an error" {
set pattern "*Unexpected end of file reading the append only file*"
set retry 10
......@@ -79,7 +79,7 @@ tags {"aof"} {
append_to_aof [string range [formatCommand set bar world] 0 end-1]
}
start_server_aof [list dir $server_path] {
start_server_aof [list dir $server_path aof-load-truncated no] {
test "Short read: Server should have logged an error" {
set pattern "*Unexpected end of file reading the append only file*"
set retry 10
......@@ -111,7 +111,7 @@ tags {"aof"} {
}
## Test that the server can be started using the truncated AOF
start_server_aof [list dir $server_path] {
start_server_aof [list dir $server_path aof-load-truncated no] {
test "Fixed AOF: Server should have been started" {
assert_equal 1 [is_alive $srv]
}
......@@ -135,7 +135,7 @@ tags {"aof"} {
append_to_aof [formatCommand spop set]
}
start_server_aof [list dir $server_path] {
start_server_aof [list dir $server_path aof-load-truncated no] {
test "AOF+SPOP: Server should have been started" {
assert_equal 1 [is_alive $srv]
}
......@@ -158,7 +158,7 @@ tags {"aof"} {
append_to_aof [formatCommand rpush list bar]
}
start_server_aof [list dir $server_path] {
start_server_aof [list dir $server_path aof-load-truncated no] {
test "AOF+EXPIRE: Server should have been started" {
assert_equal 1 [is_alive $srv]
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册