From 88a18f8b7dde09a68240be4511f57a812b250def 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 | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/emulate.yml b/.github/workflows/emulate.yml index e065c15ad..a87ae62c9 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 -d logcat System.out:I *:S && 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..80999d30b 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 { @@ -1441,6 +1442,7 @@ public void run() throws Exception { } @Test + @SdkSuppress(minSdkVersion = 21) public void Realtime_push_interface() throws Exception { AblyRealtime realtime = new AblyRealtime(new ClientOptions() {{ autoConnect = false;