Skip to content

Commit 83a513a

Browse files
committed
Update tests.kt
1 parent 7924813 commit 83a513a

File tree

1 file changed

+3
-2
lines changed
  • firebase-ai/src/test/java/com/google/firebase/ai/util

1 file changed

+3
-2
lines changed

firebase-ai/src/test/java/com/google/firebase/ai/util/tests.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)