Skip to content

Commit

Permalink
Merge pull request #1844 from aaronlehmann/speed-up-TestRestartLeader
Browse files Browse the repository at this point in the history
integration: Speed up TestRestartLeader
  • Loading branch information
LK4D4 authored Jan 7, 2017
2 parents 0bc3921 + 98a5ee3 commit 4762d92
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ func TestDemoteDownedManager(t *testing.T) {
}

func TestRestartLeader(t *testing.T) {
numWorker, numManager := 10, 5
numWorker, numManager := 5, 3
cl := newCluster(t, numWorker, numManager)
defer func() {
require.NoError(t, cl.Stop())
Expand All @@ -386,19 +386,6 @@ func TestRestartLeader(t *testing.T) {

require.NoError(t, leader.Pause())

require.NoError(t, raftutils.PollFuncWithTimeout(nil, func() error {
resp, err := cl.api.GetNode(context.Background(), &api.GetNodeRequest{
NodeID: origLeaderID,
})
if err != nil {
return err
}
if resp.Node.Status.State != api.NodeStatus_DOWN {
return errors.Errorf("node %s is still not down", origLeaderID)
}
return nil
}, opsTimeout))

require.NoError(t, raftutils.PollFuncWithTimeout(nil, func() error {
resp, err := cl.api.ListNodes(context.Background(), &api.ListNodesRequest{})
if err != nil {
Expand Down

0 comments on commit 4762d92

Please # to comment.