Browse Source

Merge pull request #5319 from xiang90/fix_rafthttp_test

*: fix TestTransportErrorc
Xiang Li 9 years ago
parent
commit
ca105a1c89
1 changed files with 1 additions and 2 deletions
  1. 1 2
      rafthttp/transport_test.go

+ 1 - 2
rafthttp/transport_test.go

@@ -146,10 +146,9 @@ func TestTransportErrorc(t *testing.T) {
 	}
 	tr.peers[1].send(raftpb.Message{})
 
-	testutil.WaitSchedule()
 	select {
 	case <-errorc:
-	default:
+	case <-time.After(1 * time.Second):
 		t.Fatalf("cannot receive error from errorc")
 	}
 }