From 5a5e320ea3ed3edad9f62160e1a69a884e119568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20G=C3=B3ral?= <60390247+jan-gogo@users.noreply.github.com> Date: Mon, 31 May 2021 12:43:34 +0200 Subject: [PATCH] fix: CIOEngineContainer not found (#1982) Fixes #1979 ## Test Plan > How do we know the code works? Add the configuration file `test_configs/corellium_auth.yml` and call: ```shell . .env flankScripts assemble flank flank corellium test android run -c="test_configs/flank-corellium.yml" ``` The execution should pass without exceptions. --- .../src/main/kotlin/flank/corellium/client/agent/Connect.kt | 3 ++- .../main/kotlin/flank/corellium/client/console/Connect.kt | 3 ++- test_configs/.gitignore | 1 + test_configs/flank-corellium.yml | 6 ++++++ 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 test_configs/.gitignore create mode 100644 test_configs/flank-corellium.yml diff --git a/corellium/client/src/main/kotlin/flank/corellium/client/agent/Connect.kt b/corellium/client/src/main/kotlin/flank/corellium/client/agent/Connect.kt index ea3bd10578..6a23d4a0eb 100644 --- a/corellium/client/src/main/kotlin/flank/corellium/client/agent/Connect.kt +++ b/corellium/client/src/main/kotlin/flank/corellium/client/agent/Connect.kt @@ -3,6 +3,7 @@ package flank.corellium.client.agent import flank.corellium.client.data.AgentOperation import flank.corellium.client.data.CommandResult import io.ktor.client.HttpClient +import io.ktor.client.engine.cio.CIO import io.ktor.client.features.logging.LogLevel import io.ktor.client.features.logging.Logging import io.ktor.client.features.websocket.DefaultClientWebSocketSession @@ -23,7 +24,7 @@ suspend fun connectAgent( token: String, logLevel: LogLevel = LogLevel.NONE ): Agent = run { - val client = HttpClient { + val client = HttpClient(CIO) { install(WebSockets) install(Logging) { level = logLevel diff --git a/corellium/client/src/main/kotlin/flank/corellium/client/console/Connect.kt b/corellium/client/src/main/kotlin/flank/corellium/client/console/Connect.kt index fb85ab259e..3772489844 100644 --- a/corellium/client/src/main/kotlin/flank/corellium/client/console/Connect.kt +++ b/corellium/client/src/main/kotlin/flank/corellium/client/console/Connect.kt @@ -1,6 +1,7 @@ package flank.corellium.client.console import io.ktor.client.HttpClient +import io.ktor.client.engine.cio.CIO import io.ktor.client.features.websocket.WebSockets import io.ktor.client.features.websocket.webSocketSession import io.ktor.client.request.header @@ -10,7 +11,7 @@ suspend fun connectConsole( url: String, token: String ): Console = - HttpClient { + HttpClient(CIO) { install(WebSockets) }.webSocketSession { url(url) diff --git a/test_configs/.gitignore b/test_configs/.gitignore new file mode 100644 index 0000000000..b0145d0d08 --- /dev/null +++ b/test_configs/.gitignore @@ -0,0 +1 @@ +corellium_auth.yml diff --git a/test_configs/flank-corellium.yml b/test_configs/flank-corellium.yml new file mode 100644 index 0000000000..88cd89829a --- /dev/null +++ b/test_configs/flank-corellium.yml @@ -0,0 +1,6 @@ +auth: "test_configs/corellium_auth.yml" +apks: + - path: "test_artifacts/master/apk/app-debug.apk" + tests: + - path: "test_artifacts/master/apk/app-multiple-flaky-debug-androidTest.apk" +max-test-shards: 3