File tree Expand file tree Collapse file tree
src/androidTest/kotlin/com/google/firebase/ai Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ plugins {
2626}
2727
2828firebaseLibrary {
29- testLab.enabled = false
29+ testLab.enabled = true
3030 publishJavadoc = true
3131 releaseNotes {
3232 name.set(" {{firebase_ai_logic}}" )
Original file line number Diff line number Diff line change @@ -279,6 +279,7 @@ class LiveSessionTests {
279279 val session = liveModel.connect(SessionResumptionConfig ())
280280 session.send(" My favorite color is blue. Remember that." , true )
281281 var lastResumptionUpdate: LiveSessionResumptionUpdate ? = null
282+ var gotTurnComplete = false
282283 withTimeout(30 .seconds) {
283284 session
284285 .receive()
@@ -287,10 +288,10 @@ class LiveSessionTests {
287288 lastResumptionUpdate = it
288289 }
289290 if (it is LiveServerContent && it.turnComplete) {
290- false
291- } else {
292- true
291+ gotTurnComplete = true
293292 }
293+ // Stop when we've seen a turn complete and we have a new handle
294+ ! (gotTurnComplete && lastResumptionUpdate?.newHandle != null )
294295 }
295296 .collect {}
296297 }
You can’t perform that action at this time.
0 commit comments