File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
firebase-ai/src/test/java/com/google/firebase/ai/util
firebase-vertexai/src/test/java/com/google/firebase/vertexai/util Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -210,15 +210,16 @@ internal fun goldenUnaryFile(
210
210
httpStatusCode : HttpStatusCode = HttpStatusCode .OK ,
211
211
backend : GenerativeBackend = GenerativeBackend .vertexAI(),
212
212
block : CommonTest ,
213
- ) =
213
+ ) = doBlocking {
214
214
commonTest(httpStatusCode, backend = backend) {
215
215
val goldenFile = loadGoldenFile(name)
216
216
val message = goldenFile.readText()
217
217
218
- channel.send(message.toByteArray())
218
+ launch { channel.send(message.toByteArray()) }
219
219
220
220
block()
221
221
}
222
+ }
222
223
223
224
/* *
224
225
* A variant of [goldenUnaryFile] for vertexai tests Loads the *Golden File* and automatically
Original file line number Diff line number Diff line change @@ -189,15 +189,16 @@ internal fun goldenUnaryFile(
189
189
name : String ,
190
190
httpStatusCode : HttpStatusCode = HttpStatusCode .OK ,
191
191
block : CommonTest ,
192
- ) =
192
+ ) = doBlocking {
193
193
commonTest(httpStatusCode) {
194
194
val goldenFile = loadGoldenFile(name)
195
195
val message = goldenFile.readText()
196
196
197
- channel.send(message.toByteArray())
197
+ launch { channel.send(message.toByteArray()) }
198
198
199
199
block()
200
200
}
201
+ }
201
202
202
203
/* *
203
204
* A variant of [goldenUnaryFile] for vertexai tests Loads the *Golden File* and automatically
You can’t perform that action at this time.
0 commit comments