Commit 7280c5e
committed
Support testing unary-stream calls that return a coroutine
Originally testing unary-stream calls assumed a `GrpcStreamBroadcaster`
is used, which means a `Receiver` is returned synchronously. But not all
unary-stream calls adopt this pattern, and some might be async, so
returning a coroutine instead.
With this commit we inspect the return value and if it is a coroutine,
we await for it and assign the awaited value as the client result.
Signed-off-by: Leandro Lucarella <[email protected]>1 parent 3dcb244 commit 7280c5e
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1001 | 1001 | | |
1002 | 1002 | | |
1003 | 1003 | | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
1004 | 1008 | | |
1005 | 1009 | | |
1006 | 1010 | | |
| |||
0 commit comments