Skip to content

Commit

Permalink
WIP integration with sdk-test-proxy
Browse files Browse the repository at this point in the history
TODO can we decrease the 1m 55s this takes to start?
TODO can we reduce the risk of one test case or test run contaminating another?

Resolves #1003.
  • Loading branch information
lawrence-forooghian committed Feb 20, 2023
1 parent 641faf1 commit 639b1e1
Show file tree
Hide file tree
Showing 11 changed files with 188 additions and 1,570 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/emulate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,19 @@ jobs:
excludeModules: true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

# Gradle 7 requires Java 11 to run
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: '19'

- name: Start SDK test proxy server
run: cd external/sdk-test-proxy && ./start-service
if: matrix.api-level != 21

- uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "external/sdk-test-proxy"]
path = external/sdk-test-proxy
url = [email protected]:ably/sdk-test-proxy.git
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The version of Gradle that this project uses is specified by the `distributionUr

If you are using [`asdf`](https://asdf-vm.com) to manage tool versions, then you can rely on the `.tool-versions` file in this repository, which is configured to use an appropriate version of Java.

## Running the test proxy server

In order to run the `NetworkConnectivityTests`, you will need to be running an instance of the [SDK Test Proxy](https://github.com/ably/sdk-test-proxy) on your development machine. You can do this by executing `./gradlew run` inside the `external/sdk-test-proxy` directory.

## Development

This repository is structured as a Gradle [Multi-Project Build](https://docs.gradle.org/current/userguide/multi_project_builds.html).
Expand Down
9 changes: 2 additions & 7 deletions android-test-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,17 @@ plugins {
id 'com.android.library'
id 'kotlin-android'
id 'org.jlleitschuh.gradle.ktlint'
id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlin_version"
}

dependencies {
implementation project(':core-sdk')
implementation "io.ably:ably-android:$ably_core_version"

// Ktor dependencies for Layer 7 proxy in NetworkConnectivityTest
implementation "io.ktor:ktor-server-websockets:$ktor_version"
implementation "io.ktor:ktor-server-cio:$ktor_version"
implementation "io.ktor:ktor-server-call-logging:$ktor_version"
implementation "io.ktor:ktor-client-cio:$ktor_version"
implementation "io.ktor:ktor-client-websockets:$ktor_version"
implementation "io.ktor:ktor-client-logging:$ktor_version"
implementation "uk.uuid.slf4j:slf4j-android:1.7.36-0"

implementation 'org.msgpack:msgpack-core:0.9.3'
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1'
}

android {
Expand Down
Loading

0 comments on commit 639b1e1

Please sign in to comment.