Commit ae62635
authored
transport: Ensure stream context is cancelled in test (#8647)
Fixes: #8646
The server stream's timer to monitor the deadline is closed when the
stream's cancel method is invoked.
https://github.com/grpc/grpc-go/blob/2d922719c02bb46f34482d592c35e72dc4a9ad92/internal/transport/http2_server.go#L623-L637
The cancel method is called when `closeStream` is called, just before it
calls `deleteStream`.
https://github.com/grpc/grpc-go/blob/2d922719c02bb46f34482d592c35e72dc4a9ad92/internal/transport/http2_server.go#L1347-L1357
The cancel method is not called in
[`deleteStream`](https://github.com/grpc/grpc-go/blob/2d922719c02bb46f34482d592c35e72dc4a9ad92/internal/transport/http2_server.go#L1302).
This change invokes `deleteStream` through `closeStream` in the flaking
test to ensure the stream is always cancelled to avoid leaking timers.
RELEASE NOTES: N/A1 parent 7902ebe commit ae62635
1 file changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3360 | 3360 | | |
3361 | 3361 | | |
3362 | 3362 | | |
| 3363 | + | |
| 3364 | + | |
3363 | 3365 | | |
3364 | 3366 | | |
3365 | 3367 | | |
| |||
3386 | 3388 | | |
3387 | 3389 | | |
3388 | 3390 | | |
3389 | | - | |
3390 | | - | |
3391 | | - | |
3392 | 3391 | | |
3393 | 3392 | | |
3394 | 3393 | | |
| |||
3449 | 3448 | | |
3450 | 3449 | | |
3451 | 3450 | | |
3452 | | - | |
3453 | | - | |
| 3451 | + | |
| 3452 | + | |
| 3453 | + | |
| 3454 | + | |
3454 | 3455 | | |
3455 | 3456 | | |
3456 | 3457 | | |
| |||
0 commit comments