Skip to content

Commit 9fe6076

Browse files
authored
Merge pull request #147 from hanxizh9910/feature/automated-test-failure-detector
Feature/automated test failure detector
2 parents 493eb8b + 0959619 commit 9fe6076

3 files changed

Lines changed: 19 additions & 2 deletions

File tree

tests/cluster/tests/03-failover-loop.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ while {[incr iterations -1]} {
7878
}
7979

8080
test "Cluster should eventually be up again" {
81-
assert_cluster_state ok
81+
assert_cluster_state okk
8282
}
8383

8484
test "Cluster is writable again" {

tests/sentinel/tests/00-base.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ test "SENTINEL INFO CACHE returns the cached info" {
4949
assert_equal "mymaster" [lindex $res 0]
5050

5151
set res [lindex $res 1]
52-
assert_morethan_equal [llength $res] 2
52+
assert_morethan_equal [llength $res] 20
5353
assert_morethan [lindex $res 0] 0
5454
assert_match "*# Server*" [lindex $res 1]
5555
}

tests/unit/dummy-flaky.tcl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
start_server {tags {"dummy"}} {
2+
test "dummy-flaky - basic SET and GET" {
3+
r SET mykey myvalue
4+
assert_equal [r GET mykey] "myvalue"
5+
}
6+
7+
test "dummy-flaky - intentional failure" {
8+
r SET mykey myvalue
9+
assert_equal [r GET mykey] "wrongvalue"
10+
}
11+
12+
test "dummy-flaky - another passing test" {
13+
r SET counter 0
14+
r INCR counter
15+
assert_equal [r GET counter] "1"
16+
}
17+
}

0 commit comments

Comments
 (0)