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
c7841c2b
Commit
c7841c2b
authored
Sep 11, 2018
by
antirez
Browse files
Slave removal: remove slave from top-level tests descriptions.
parent
1b9b19ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
tests/unit/maxmemory.tcl
View file @
c7841c2b
...
...
@@ -163,7 +163,7 @@ proc test_slave_buffers {test_name cmd_count payload_len limit_memory pipeline}
# make sure master doesn't disconnect slave because of timeout
$master config set repl-timeout 300
;
# 5 minutes
$master config set maxmemory-policy allkeys-random
$master config set client-output-buffer-limit
"
slave
100000000 100000000 300"
$master config set client-output-buffer-limit
"
replica
100000000 100000000 300"
$master config set repl-backlog-size
[
expr
{
10*1024
}]
$slave slaveof $master_host $master_port
...
...
@@ -238,5 +238,5 @@ test_slave_buffers {slave buffer are counted correctly} 1000000 10 0 1
# test that slave buffer don't induce eviction
# test again with fewer
(
and bigger
)
commands without pipeline, but with eviction
test_slave_buffers
"
slave
buffer don't induce eviction"
100000 100 1 0
test_slave_buffers
"
replica
buffer don't induce eviction"
100000 100 1 0
tests/unit/pendingquerybuf.tcl
View file @
c7841c2b
...
...
@@ -29,7 +29,7 @@ start_server {} {
set m_usedmemory
[
info_memory $master used_memory
]
set s_usedmemory
[
info_memory $slave used_memory
]
if
{
$s_usedmemory > $m_usedmemory + 10*1024*1024
}
{
fail
"the used_memory of
slave is too
larger than master.Master:
$m
_usedmemory
Slave
:
$s
_usedmemory"
fail
"the used_memory of
replica is much
larger than master.
Master:
$m
_usedmemory
Replica
:
$s
_usedmemory"
}
}
}}
tests/unit/scripting.tcl
View file @
c7841c2b
...
...
@@ -542,7 +542,7 @@ foreach cmdrepl {0 1} {
r debug lua-always-replicate-commands 1
}
test
"Before the
slave
connects we issue two EVAL commands
$rt
"
{
test
"Before the
replica
connects we issue two EVAL commands
$rt
"
{
# One with an error, but still executing a command.
# SHA is: 67164fc43fa971f76fd1aaeeaf60c1c178d25876
catch
{
...
...
@@ -553,13 +553,13 @@ foreach cmdrepl {0 1} {
r eval
{
return redis.call
(
'incr',KEYS
[
1
])}
1 x
}
{
2
}
test
"Connect a
slave
to the master instance
$rt
"
{
test
"Connect a
replica
to the master instance
$rt
"
{
r -1 slaveof
[
srv 0 host
]
[
srv 0 port
]
wait_for_condition 50 100
{
[
s -1 role
]
eq
{
slave
}
&&
[
string match
{
*master_link_status:up*
}
[
r -1 info replication
]]
}
else
{
fail
"Can't turn the instance into a
slave
"
fail
"Can't turn the instance into a
replica
"
}
}
...
...
@@ -592,7 +592,7 @@ foreach cmdrepl {0 1} {
wait_for_condition 50 100
{
[
r -1 lrange a 0 -1
]
eq
[
r lrange a 0 -1
]
}
else
{
fail
"Expected list 'a' in
slave
and master to be the same, but they are respectively '
[
r -1 lrange a 0 -1
]
' and '
[
r lrange a 0 -1
]
'"
fail
"Expected list 'a' in
replica
and master to be the same, but they are respectively '
[
r -1 lrange a 0 -1
]
' and '
[
r lrange a 0 -1
]
'"
}
set res
}
{
a 1
}
...
...
@@ -627,7 +627,7 @@ foreach cmdrepl {0 1} {
wait_for_condition 50 100
{
[
r -1 debug digest
]
eq
[
r debug digest
]
}
else
{
fail
"Master-
Slave
desync after Lua script using SELECT."
fail
"Master-
Replica
desync after Lua script using SELECT."
}
}
}
...
...
@@ -636,13 +636,13 @@ foreach cmdrepl {0 1} {
start_server
{
tags
{
"scripting repl"
}}
{
start_server
{
overrides
{
appendonly yes aof-use-rdb-preamble no
}}
{
test
"Connect a
slave
to the master instance"
{
test
"Connect a
replica
to the master instance"
{
r -1 slaveof
[
srv 0 host
]
[
srv 0 port
]
wait_for_condition 50 100
{
[
s -1 role
]
eq
{
slave
}
&&
[
string match
{
*master_link_status:up*
}
[
r -1 info replication
]]
}
else
{
fail
"Can't turn the instance into a
slave
"
fail
"Can't turn the instance into a
replica
"
}
}
...
...
@@ -696,7 +696,7 @@ start_server {tags {"scripting repl"}} {
wait_for_condition 50 100
{
[
r -1 mget a b c d
]
eq
{
1
{}
{}
4
}
}
else
{
fail
"Only a and c should be replicated to
slave
"
fail
"Only a and c should be replicated to
replica
"
}
# Master should have everything right now
...
...
@@ -735,7 +735,7 @@ start_server {tags {"scripting repl"}} {
wait_for_condition 50 100
{
[
r get time
]
eq
[
r -1 get time
]
}
else
{
fail
"Time key does not match between master and
slave
"
fail
"Time key does not match between master and
replica
"
}
}
}
...
...
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