test(android): fix GatewaySessionInvokeTest coroutine job typing (#31594)

This commit is contained in:
Peter Steinberger
2026-03-02 14:53:56 +00:00
parent 998d477f5e
commit e08ba063d8

View File

@@ -3,6 +3,7 @@ package ai.openclaw.android.gateway
import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.CompletableDeferred
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.cancelAndJoin import kotlinx.coroutines.cancelAndJoin
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
@@ -44,7 +45,7 @@ private class InMemoryDeviceAuthStore : DeviceAuthTokenStore {
private data class NodeHarness( private data class NodeHarness(
val session: GatewaySession, val session: GatewaySession,
val sessionJob: SupervisorJob, val sessionJob: Job,
) )
private data class InvokeScenarioResult( private data class InvokeScenarioResult(
@@ -86,7 +87,7 @@ class GatewaySessionInvokeTest {
val result = val result =
runInvokeScenario( runInvokeScenario(
invokeEventFrame = invokeEventFrame =
"""{"type":"event","event":"node.invoke.request","payload":{"id":"invoke-2","nodeId":"node-2","command":"debug.raw","paramsJSON":"{\\"raw\\":true}","params":{"ignored":1},"timeoutMs":5000}}""", """{"type":"event","event":"node.invoke.request","payload":{"id":"invoke-2","nodeId":"node-2","command":"debug.raw","paramsJSON":"{\"raw\":true}","params":{"ignored":1},"timeoutMs":5000}}""",
) { ) {
GatewaySession.InvokeResult.ok("""{"handled":true}""") GatewaySession.InvokeResult.ok("""{"handled":true}""")
} }