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
2f717c15
"vscode:/vscode.git/clone" did not exist on "72ff03346fcf3d5a839b85bd1ebd7850c2e5d9aa"
Unverified
Commit
2f717c15
authored
Mar 22, 2021
by
Oran Agra
Committed by
GitHub
Mar 22, 2021
Browse files
fix race in diskless load cluster tests (#8674)
parent
a7c02b19
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/cluster/tests/17-diskless-load-swapdb.tcl
View file @
2f717c15
...
@@ -36,7 +36,7 @@ test "Right to restore backups when fail to diskless load " {
...
@@ -36,7 +36,7 @@ test "Right to restore backups when fail to diskless load " {
# Write a key that belongs to slot 0
# Write a key that belongs to slot 0
set slot0_key
"06S"
set slot0_key
"06S"
$master set $slot0_key 1
$master set $slot0_key 1
after 100
wait_for_ofs_sync $master $replica
assert_equal
{
1
}
[
$replica
get $slot0_key
]
assert_equal
{
1
}
[
$replica
get $slot0_key
]
assert_equal $slot0_key
[
$replica
CLUSTER GETKEYSINSLOT 0 1
]
assert_equal $slot0_key
[
$replica
CLUSTER GETKEYSINSLOT 0 1
]
...
@@ -73,6 +73,13 @@ test "Right to restore backups when fail to diskless load " {
...
@@ -73,6 +73,13 @@ test "Right to restore backups when fail to diskless load " {
# Kill master, abort full sync
# Kill master, abort full sync
kill_instance redis $master_id
kill_instance redis $master_id
# Start full sync, wait till the replica detects the disconnection
wait_for_condition 500 10
{
[
s $replica_id loading
]
eq 0
}
else
{
fail
"Fail to full sync"
}
# Replica keys and keys to slots map still both are right
# Replica keys and keys to slots map still both are right
assert_equal
{
1
}
[
$replica
get $slot0_key
]
assert_equal
{
1
}
[
$replica
get $slot0_key
]
assert_equal $slot0_key
[
$replica
CLUSTER GETKEYSINSLOT 0 1
]
assert_equal $slot0_key
[
$replica
CLUSTER GETKEYSINSLOT 0 1
]
...
...
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