Skip to content

Commit acad1d9

Browse files
authored
Merge 0e4bffc into cbd9636
2 parents cbd9636 + 0e4bffc commit acad1d9

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

2 files changed

+6
-4
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

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

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

0 commit comments

Comments
 (0)