-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Flaky test: 6/100K: Test/LRSClient #7241
Comments
No failures in 10K runs on Forge. |
Happened to me today. Maybe this is more common now for some reason? |
I suspect what's happening here is that that we're sometimes getting a second load report before the client closes the stream. We're setting the load report interval to 50 ms here: grpc-go/xds/internal/xdsclient/loadreport_test.go Lines 106 to 109 in cfd14ba
In the final assertion of the test, we're checking that the very next request present in the fake server's request channel is the client cancellation: grpc-go/xds/internal/xdsclient/loadreport_test.go Lines 136 to 138 in cfd14ba
When the the test takes more than 50 ms b/w sending the first LRS response with the load report interval and this final assertion, another load report can be sent by the client here: grpc-go/xds/internal/xdsclient/transport/loadreport.go Lines 136 to 150 in cfd14ba
I was able to make the test fail with a similar error message ( grpc-go/xds/internal/xdsclient/loadreport_test.go Lines 113 to 116 in cfd14ba
A possible fix would be to read from // Server should receive a stream canceled error.
for {
u, err := fs2.LRSRequestChan.Receive(ctx)
if err != nil {
t.Fatalf("unexpected error while reading LRS request: %v", err)
}
if u.(*fakeserver.Request).Err == nil {
continue
}
if status.Code(u.(*fakeserver.Request).Err) != codes.Canceled {
t.Errorf("unexpected LRS request: %v, want error canceled", u)
}
break
} |
Verified 0 failures in 100k runs after the fix. |
https://github.com/grpc/grpc-go/actions/runs/9134961110/job/25121494558?pr=7240
The text was updated successfully, but these errors were encountered: