cleanup a test

This commit is contained in:
iamqizhao
2015-10-22 11:55:01 -07:00
parent 7fcfcfa816
commit 78e8635e67

View File

@ -733,13 +733,13 @@ func testRetry(t *testing.T, e env) {
} }
wg.Wait() wg.Wait()
} }
/*
func TestRPCTimeout(t *testing.T) { func TestRPCTimeout(t *testing.T) {
for _, e := range listTestEnv() { for _, e := range listTestEnv() {
testRPCTimeout(t, e) testRPCTimeout(t, e)
} }
} }
*/
// TODO(zhaoq): Have a better test coverage of timeout and cancellation mechanism. // TODO(zhaoq): Have a better test coverage of timeout and cancellation mechanism.
func testRPCTimeout(t *testing.T, e env) { func testRPCTimeout(t *testing.T, e env) {
s, cc := setUp(t, nil, math.MaxUint32, "", e) s, cc := setUp(t, nil, math.MaxUint32, "", e)
@ -1060,13 +1060,10 @@ func testExceedMaxStreamsLimit(t *testing.T, e env) {
s, cc := setUp(t, nil, 1, "", e) s, cc := setUp(t, nil, 1, "", e)
tc := testpb.NewTestServiceClient(cc) tc := testpb.NewTestServiceClient(cc)
defer tearDown(s, cc) defer tearDown(s, cc)
stream, err := tc.StreamingInputCall(context.Background()) _, err := tc.StreamingInputCall(context.Background())
if err != nil { if err != nil {
t.Fatalf("%v.StreamingInputCall(_) = _, %v, want _, <nil>", tc, err) t.Fatalf("%v.StreamingInputCall(_) = _, %v, want _, <nil>", tc, err)
} }
go func() {
stream.Header()
}()
// Loop until receiving the new max stream setting from the server. // Loop until receiving the new max stream setting from the server.
for { for {
ctx, _ := context.WithTimeout(context.Background(), time.Second) ctx, _ := context.WithTimeout(context.Background(), time.Second)