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(
210210 httpStatusCode : HttpStatusCode = HttpStatusCode .OK ,
211211 backend : GenerativeBackend = GenerativeBackend .vertexAI(),
212212 block : CommonTest ,
213- ) =
213+ ) = doBlocking {
214214 commonTest(httpStatusCode, backend = backend) {
215215 val goldenFile = loadGoldenFile(name)
216216 val message = goldenFile.readText()
217217
218- channel.send(message.toByteArray())
218+ launch { channel.send(message.toByteArray()) }
219219
220220 block()
221221 }
222+ }
222223
223224/* *
224225 * 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(
189189 name : String ,
190190 httpStatusCode : HttpStatusCode = HttpStatusCode .OK ,
191191 block : CommonTest ,
192- ) =
192+ ) = doBlocking {
193193 commonTest(httpStatusCode) {
194194 val goldenFile = loadGoldenFile(name)
195195 val message = goldenFile.readText()
196196
197- channel.send(message.toByteArray())
197+ launch { channel.send(message.toByteArray()) }
198198
199199 block()
200200 }
201+ }
201202
202203/* *
203204 * 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