From abc020e8d8077ac32449cc924ddaa5b587b87376 Mon Sep 17 00:00:00 2001 From: Aaron Silverman Date: Mon, 23 Oct 2023 15:11:21 -0600 Subject: [PATCH] try port forwarding --- .github/workflows/test.yml | 11 ++++++++++- .../java/cloud/eppo/android/EppoClientTest.java | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 03153f7d..c559f0d6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,4 +43,13 @@ jobs: api-level: 33 target: google_apis arch: x86_64 - script: make test \ No newline at end of file + script: echo "Emulator started" + - name: Forward mock server port + run: adb forward tcp:4001 tcp:4001 + - name: Run tests + uses: ReactiveCircus/android-emulator-runner@v2 + with: + api-level: 33 + target: google_apis + arch: x86_64 + script: make test diff --git a/eppo/src/androidTest/java/cloud/eppo/android/EppoClientTest.java b/eppo/src/androidTest/java/cloud/eppo/android/EppoClientTest.java index 3dcb4726..7f1cb5c5 100644 --- a/eppo/src/androidTest/java/cloud/eppo/android/EppoClientTest.java +++ b/eppo/src/androidTest/java/cloud/eppo/android/EppoClientTest.java @@ -41,8 +41,8 @@ public class EppoClientTest { private static final String TAG = EppoClientTest.class.getSimpleName(); private static final int TEST_PORT = 4001; - private static final String HOST = "http://10.0.0.2:" + TEST_PORT; - private static final String INVALID_HOST = "http://10.0.0.2:" + (TEST_PORT + 1); + private static final String HOST = "http://localhost:" + TEST_PORT; + private static final String INVALID_HOST = "http://localhost:" + (TEST_PORT + 1); private WireMockServer mockServer; private Gson gson = new GsonBuilder() .registerTypeAdapter(EppoValue.class, new EppoValueAdapter())