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
4f8458d8
Unverified
Commit
4f8458d8
authored
Jan 12, 2021
by
Oran Agra
Committed by
GitHub
Jan 12, 2021
Browse files
fix race in cluster transactions test (#8312)
we didn't wait for the commands executed on the master to reach the replica.
parent
b24b4903
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/cluster/tests/16-transactions-on-replica.tcl
View file @
4f8458d8
...
@@ -15,6 +15,7 @@ set replica [Rn 1]
...
@@ -15,6 +15,7 @@ set replica [Rn 1]
test
"Cant read from replica without READONLY"
{
test
"Cant read from replica without READONLY"
{
$primary SET a 1
$primary SET a 1
wait_for_ofs_sync $primary $replica
catch
{
$replica
GET a
}
err
catch
{
$replica
GET a
}
err
assert
{[
string range $err 0 4
]
eq
{
MOVED
}}
assert
{[
string range $err 0 4
]
eq
{
MOVED
}}
}
}
...
@@ -28,6 +29,7 @@ test "Can preform HSET primary and HGET from replica" {
...
@@ -28,6 +29,7 @@ test "Can preform HSET primary and HGET from replica" {
$primary HSET h a 1
$primary HSET h a 1
$primary HSET h b 2
$primary HSET h b 2
$primary HSET h c 3
$primary HSET h c 3
wait_for_ofs_sync $primary $replica
assert
{[
$replica
HGET h a
]
eq
{
1
}}
assert
{[
$replica
HGET h a
]
eq
{
1
}}
assert
{[
$replica
HGET h b
]
eq
{
2
}}
assert
{[
$replica
HGET h b
]
eq
{
2
}}
assert
{[
$replica
HGET h c
]
eq
{
3
}}
assert
{[
$replica
HGET h c
]
eq
{
3
}}
...
...
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