You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d76d159
Browse filesBrowse the repository at this point in the historyBrowse files
In
`SessionImplTest#multiUseReadOnlyTransactionCanUseInlineBeginForReadAsync`,
mock `rpc.read` invoked stream callbacks synchronously before returning
`StreamingCall`. This caused a background thread to process rows and
invoke `startStream` while `this.stream` was still unassigned,
triggering a duplicate request (`expected:<1> but was:<2>`).
Fix this deterministically by delaying `consumer.onPartialResultSet` and
`consumer.onCompleted` until `StreamingCall.request(int)` is called. In
gRPC streaming, `this.stream` is guaranteed to be assigned before
`request()` is executed, eliminating the race condition without relying
on background threads or executors.
0 commit comments