Skip to content

Commit

Permalink
Merge pull request #805 from xiangli-cmu/fix_test
Browse files Browse the repository at this point in the history
fix(test/remove_node_test.go) fix a deadlock in the test
  • Loading branch information
xiang90 committed May 20, 2014
2 parents 16d89c9 + aaedf32 commit 6860bfd
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions tests/functional/remove_node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,20 +185,8 @@ func TestRemovePausedNode(t *testing.T) {

etcds[idx].Signal(syscall.SIGSTOP)
fmt.Printf("pause node%d and let standby node take its place\n", idx+1)
time.Sleep(4 * time.Second)

resp, err := c.Get("_etcd/machines", false, false)
if err != nil {
panic(err)
}
if len(resp.Node.Nodes) != 3 {
t.Fatal("cannot remove peer")
}
for i := 0; i < 3; i++ {
if resp.Node.Nodes[i].Key == fmt.Sprintf("node%d", idx+1) {
t.Fatal("node should be removed")
}
}
time.Sleep(4 * time.Second)

etcds[idx].Signal(syscall.SIGCONT)
// let it change its state to candidate at least
Expand Down

0 comments on commit 6860bfd

Please sign in to comment.