-
Notifications
You must be signed in to change notification settings - Fork 23.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'integration' of git://github.com/pietern/redis
- Loading branch information
Showing
4 changed files
with
93 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
start_server default.conf {} { | ||
r set mykey foo | ||
|
||
start_server default.conf {} { | ||
test {Second server should have role master at first} { | ||
s role | ||
} {master} | ||
|
||
test {SLAVEOF should start with link status "down"} { | ||
r slaveof [srv -1 host] [srv -1 port] | ||
s master_link_status | ||
} {down} | ||
|
||
test {The role should immediately be changed to "slave"} { | ||
s role | ||
} {slave} | ||
|
||
wait_for_sync r | ||
test {Sync should have transferred keys from master} { | ||
r get mykey | ||
} {foo} | ||
|
||
test {The link status should be up} { | ||
s master_link_status | ||
} {up} | ||
|
||
test {SET on the master should immediately propagate} { | ||
r -1 set mykey bar | ||
r 0 get mykey | ||
} {bar} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters