Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6081311 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Skip testSendMultipartSmsByCarrierAppNoResponse on automotive

This test is particularily flaky there.

Bug: 401440427
Test: GsmSmsDispatcherTest
Flag: TEST_ONLY
Change-Id: I2c60b395b428fc44adb4ef5423f74af375031ee8
parent c537808d
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import static com.android.internal.telephony.TelephonyTestUtils.waitForMs;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeFalse;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyString;
@@ -42,6 +43,7 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.pm.ServiceInfo;
import android.location.Country;
import android.location.CountryDetector;
@@ -59,6 +61,7 @@ import android.telephony.SmsManager;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;

import androidx.test.InstrumentationRegistry;
import androidx.test.filters.FlakyTest;
import androidx.test.filters.MediumTest;
import androidx.test.filters.SmallTest;
@@ -534,9 +537,15 @@ public class GsmSmsDispatcherTest extends TelephonyTest {
        }
    }

    private void skipOnAutomotive() {
        assumeFalse(InstrumentationRegistry.getTargetContext().getPackageManager().hasSystemFeature(
                PackageManager.FEATURE_AUTOMOTIVE));
    }

    @Test
    @SmallTest
    public void testSendMultipartSmsByCarrierAppNoResponse() throws Exception {
        skipOnAutomotive(); // TODO(b/401440427): don't skip
        mockCarrierApp();
        // do not mock result, instead reduce the timeout for test
        mGsmSmsDispatcher.mCarrierMessagingTimeout = 100;