File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed
sentinel/test/async/redis Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 73
73
timeout-minutes : 10
74
74
env :
75
75
RUBY_VERSION : ${{matrix.ruby}}
76
- run : docker-compose -f sentinel/docker-compose.yaml up tests
76
+ run : docker-compose -f sentinel/docker-compose.yaml up --exit-code-from tests
77
77
78
78
- uses : actions/upload-artifact@v3
79
79
with :
Original file line number Diff line number Diff line change 38
38
timeout-minutes : 10
39
39
env :
40
40
RUBY_VERSION : ${{matrix.ruby}}
41
- run : docker-compose -f sentinel/docker-compose.yaml up tests
41
+ run : docker-compose -f sentinel/docker-compose.yaml up --exit-code-from tests
Original file line number Diff line number Diff line change 32
32
expect ( client . get ( key ) ) . to be == value
33
33
end
34
34
35
- it "can handle failover" do
36
- current_master = client . master
37
-
38
- client . failover
35
+ it "should resolve slave address" do
36
+ client . set ( key , value )
39
37
40
- # Failover takes some time to fully complete :
38
+ # It takes a while to replicate :
41
39
while true
42
- failover_master = client . master
43
- break if failover_master [ 'ip' ] != current_master [ 'ip' ]
44
- sleep 0.1
40
+ break if slave_client . get ( key ) == value
41
+ sleep 0.01
45
42
end
46
43
47
- expect ( failover_master [ 'ip' ] ) . not . to be == current_master [ 'ip' ]
44
+ expect ( slave_client . get ( key ) ) . to be == value
45
+ end
46
+
47
+ it "can handle failover" do
48
+ client . failover
48
49
49
50
# We can still connect and do stuff:
50
51
client . set ( key , value )
You can’t perform that action at this time.
0 commit comments