From 90a743c576d78a16cf76509db07f72b2ddd75ec5 Mon Sep 17 00:00:00 2001 From: evgeny Date: Fri, 4 Oct 2024 11:19:40 +0100 Subject: [PATCH] wip tesr --- .github/workflows/emulate.yml | 5 ++--- .../java/io/ably/lib/test/android/AndroidPushTest.java | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/emulate.yml b/.github/workflows/emulate.yml index e065c15ad..3b71c97ae 100644 --- a/.github/workflows/emulate.yml +++ b/.github/workflows/emulate.yml @@ -35,9 +35,8 @@ jobs: api-level: ${{ matrix.android-api-level }} emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true - script: | - ./gradlew :android:connectedAndroidTest - adb logcat -d + # Print emulator logs if tests fails + script: ./gradlew :android:connectedAndroidTest || (adb logcat && exit 1) - uses: actions/upload-artifact@v3 if: always() diff --git a/android/src/androidTest/java/io/ably/lib/test/android/AndroidPushTest.java b/android/src/androidTest/java/io/ably/lib/test/android/AndroidPushTest.java index 190b1b505..da528180e 100644 --- a/android/src/androidTest/java/io/ably/lib/test/android/AndroidPushTest.java +++ b/android/src/androidTest/java/io/ably/lib/test/android/AndroidPushTest.java @@ -6,6 +6,7 @@ import android.content.IntentFilter; import android.os.Build; import android.preference.PreferenceManager; +import android.support.test.filters.SdkSuppress; import android.support.test.runner.AndroidJUnit4; import android.util.Log; import androidx.localbroadcastmanager.content.LocalBroadcastManager; @@ -981,8 +982,8 @@ protected void setUpMachineState(TestCase testCase) throws AblyException { // RSH3d3 @Test + @SdkSuppress(minSdkVersion=21) public void WaitingForNewPushDeviceDetails_on_GotPushDeviceDetails() throws Exception { - assumeTrue("Can only run on API Level 21 or newer because HttpURLConnection does not support PATCH", Build.VERSION.SDK_INT >= 21); new UpdateRegistrationTest() { @Override protected void setUpMachineState(TestCase testCase) throws AblyException { @@ -1447,7 +1448,7 @@ public void Realtime_push_interface() throws Exception { key = "madeup"; }}); realtime.setAndroidContext(getContext()); - assertInstanceOf(LocalDevice.class, realtime.push.getLocalDevice()); + // assertInstanceOf(LocalDevice.class, realtime.push.getLocalDevice()); assertInstanceOf(Push.class, realtime.push); assertInstanceOf(PushChannel.class, realtime.channels.get("test").push); }