Commit 7b7e11e
authored
Fix AI test timeout (#6917)
Per [b/414406390](https://b.corp.google.com/issues/414406390),
This fixes the issue with long text golden files timing out the tests.
This occurred because the text contents were too large for the channel's
buffer- so the channel entered a suspension point until the content was
read. Unfortunately, this suspension point blocked the test thread. To
solve this, we do the same thing we do for `goldenStreamingFile`- we
write to the channel in a separate coroutine scope. This allows Kotlin
to properly recognize that the suspension point within the writer should
allow for the test thread to continue.1 parent cbd9636 commit 7b7e11e
2 files changed
+6
-4
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
| |||
0 commit comments