-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Labels
Description
If case <-time.After(defaultTestTimeout) is selected
grpc-go/balancer/rls/control_channel_test.go
Lines 379 to 386 in 7860144
| select { | |
| case <-time.After(defaultTestTimeout): | |
| t.Fatal("timeout when waiting for lookup callback to be invoked") | |
| case err := <-errCh: | |
| if err != nil { | |
| t.Fatal(err) | |
| } | |
| } |
There is no chan receive operation to awaken
errCh <-, which results in a goroutine leak.grpc-go/balancer/rls/control_channel_test.go
Lines 370 to 377 in 7860144
| errCh := make(chan error) | |
| ctrlCh.lookup(nil, rlspb.RouteLookupRequest_REASON_MISS, staleHeaderData, func(_ []string, _ string, err error) { | |
| if st, ok := status.FromError(err); !ok || st.Code() != wantCode || !wantErrRegex.MatchString(st.String()) { | |
| errCh <- fmt.Errorf("rlsClient.lookup() returned error: %v, wantCode: %v, wantErr: %s", err, wantCode, wantErrRegex.String()) | |
| return | |
| } | |
| errCh <- nil | |
| }) |
Reactions are currently unavailable