Browse Source

Merge pull request #4729 from xiang90/raft_fix

raft: remove unnecessary waitSchedule in test
Xiang Li 9 years ago
parent
commit
86e43b4173
1 changed files with 1 additions and 2 deletions
  1. 1 2
      raft/node_test.go

+ 1 - 2
raft/node_test.go

@@ -207,13 +207,12 @@ func TestBlockProposal(t *testing.T) {
 	}
 	}
 
 
 	n.Campaign(context.TODO())
 	n.Campaign(context.TODO())
-	testutil.WaitSchedule()
 	select {
 	select {
 	case err := <-errc:
 	case err := <-errc:
 		if err != nil {
 		if err != nil {
 			t.Errorf("err = %v, want %v", err, nil)
 			t.Errorf("err = %v, want %v", err, nil)
 		}
 		}
-	default:
+	case <-time.After(10 * time.Second):
 		t.Errorf("blocking proposal, want unblocking")
 		t.Errorf("blocking proposal, want unblocking")
 	}
 	}
 }
 }