Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
c22e0eec
Commit
c22e0eec
authored
Apr 23, 2012
by
Salvatore Sanfilippo
Browse files
Merge pull request #461 from schlenk/unstable
Replace some unnecessary calls to echo and cat in tests
parents
4e7cc35f
875944a2
Changes
3
Hide whitespace changes
Inline
Side-by-side
tests/integration/aof.tcl
View file @
c22e0eec
...
...
@@ -35,7 +35,7 @@ tags {"aof"} {
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
]
set result
[
exec
tail -n1 <
[
dict get $srv stdout
]]
if
{[
string match $pattern $result
]}
{
break
}
...
...
@@ -59,7 +59,7 @@ tags {"aof"} {
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
]
set result
[
exec
tail -n1 <
[
dict get $srv stdout
]]
if
{[
string match $pattern $result
]}
{
break
}
...
...
@@ -81,7 +81,7 @@ tags {"aof"} {
}
test
"Short read: Utility should be able to fix the AOF"
{
set result
[
exec
echo y |
src/redis-check-aof --fix $aof_path
]
set result
[
exec src/redis-check-aof --fix $aof_path
<<
"y
\n
"
]
assert_match
"*Successfully truncated AOF*"
$result
}
...
...
tests/support/server.tcl
View file @
c22e0eec
...
...
@@ -252,7 +252,7 @@ proc start_server {options {code undefined}} {
while 1
{
# check that the server actually started and is ready for connections
if
{[
exec
cat $stdout |
grep
"ready to accept"
| wc -l
]
> 0
}
{
if
{[
exec grep
"ready to accept"
| wc -l
< $stdout
]
> 0
}
{
break
}
after 10
...
...
tests/unit/aofrw.tcl
View file @
c22e0eec
...
...
@@ -7,7 +7,7 @@ start_server {tags {"aofrw"}} {
r bgrewriteaof
r config set appendonly no
r exec
set result
[
exec
cat
[
srv 0 stdout
]
| tail -n1
]
set result
[
exec
tail -n1 <
[
srv 0 stdout
]
]
}
{
*Killing*AOF*child*
}
foreach d
{
string int
}
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment