Commit 6477252
authored
Fixes: grpc#8993
This PR will fix the flaky test
`TestServerStreaming_ClientCallSendMsgTwice` introduced in PR grpc#8385 .
The test expected a single call to `stream.SendMsg()` to return a
`codes.Canceled` error immediately after the stream's context was marked
as done.
Solution: Introduced a retry loop with a timeout for the
`stream.SendMsg()` call. Instead of testing a single invocation, the
server handler now continuously attempts to send a message until it
either receives an error or timeout expired.
Successfully run the test on forge for 1 million times without any
flake.
RELEASE NOTES: N/A
1 parent 2eade05 commit 6477252
1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3960 | 3960 | | |
3961 | 3961 | | |
3962 | 3962 | | |
3963 | | - | |
| 3963 | + | |
| 3964 | + | |
| 3965 | + | |
| 3966 | + | |
| 3967 | + | |
| 3968 | + | |
| 3969 | + | |
| 3970 | + | |
| 3971 | + | |
| 3972 | + | |
| 3973 | + | |
| 3974 | + | |
3964 | 3975 | | |
3965 | 3976 | | |
3966 | 3977 | | |
| |||
0 commit comments