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

Commit dfb35428 authored by Geoffrey Pitsch's avatar Geoffrey Pitsch Committed by android-build-merger
Browse files

Merge "Move @Ignore from class-level to test level." into oc-dr1-dev

am: bcc318f9

Change-Id: I88f83646fbefeaacacd60c24859f7bd228b0d097
parents aebf79ed bcc318f9
Loading
Loading
Loading
Loading
+13 −1
Original line number Original line Diff line number Diff line
@@ -18,10 +18,10 @@ import org.junit.runner.RunWith;


@SmallTest
@SmallTest
@RunWith(AndroidJUnit4.class)
@RunWith(AndroidJUnit4.class)
@Ignore("Flaky")
public class NetworkControllerDataTest extends NetworkControllerBaseTest {
public class NetworkControllerDataTest extends NetworkControllerBaseTest {


    @Test
    @Test
    @Ignore("Flaky")
    public void test3gDataIcon() {
    public void test3gDataIcon() {
        setupDefaultSignal();
        setupDefaultSignal();


@@ -30,6 +30,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void test2gDataIcon() {
    public void test2gDataIcon() {
        setupDefaultSignal();
        setupDefaultSignal();
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
@@ -40,6 +41,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testCdmaDataIcon() {
    public void testCdmaDataIcon() {
        setupDefaultSignal();
        setupDefaultSignal();
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
@@ -50,6 +52,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testEdgeDataIcon() {
    public void testEdgeDataIcon() {
        setupDefaultSignal();
        setupDefaultSignal();
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
@@ -60,6 +63,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testLteDataIcon() {
    public void testLteDataIcon() {
        setupDefaultSignal();
        setupDefaultSignal();
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
@@ -70,6 +74,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testHspaDataIcon() {
    public void testHspaDataIcon() {
        setupDefaultSignal();
        setupDefaultSignal();
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
@@ -80,6 +85,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testWfcNoDataIcon() {
    public void testWfcNoDataIcon() {
        setupDefaultSignal();
        setupDefaultSignal();
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
@@ -89,6 +95,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void test4gDataIcon() {
    public void test4gDataIcon() {
        // Switch to showing 4g icon and re-initialize the NetworkController.
        // Switch to showing 4g icon and re-initialize the NetworkController.
        mConfig.show4gForLte = true;
        mConfig.show4gForLte = true;
@@ -108,6 +115,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testDataDisabledIcon() {
    public void testDataDisabledIcon() {
        setupNetworkController();
        setupNetworkController();
        when(mMockTm.getDataEnabled(mSubId)).thenReturn(false);
        when(mMockTm.getDataEnabled(mSubId)).thenReturn(false);
@@ -120,6 +128,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testDataDisabledIcon_UserNotSetup() {
    public void testDataDisabledIcon_UserNotSetup() {
        setupNetworkController();
        setupNetworkController();
        when(mMockTm.getDataEnabled(mSubId)).thenReturn(false);
        when(mMockTm.getDataEnabled(mSubId)).thenReturn(false);
@@ -134,6 +143,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void test4gDataIconConfigChange() {
    public void test4gDataIconConfigChange() {
        setupDefaultSignal();
        setupDefaultSignal();
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
@@ -151,6 +161,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testDataChangeWithoutConnectionState() {
    public void testDataChangeWithoutConnectionState() {
        setupDefaultSignal();
        setupDefaultSignal();
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
        updateDataConnectionState(TelephonyManager.DATA_CONNECTED,
@@ -167,6 +178,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testDataActivity() {
    public void testDataActivity() {
        setupDefaultSignal();
        setupDefaultSignal();


+29 −1
Original line number Original line Diff line number Diff line
@@ -48,10 +48,10 @@ import static org.mockito.Mockito.mock;


@SmallTest
@SmallTest
@RunWith(AndroidJUnit4.class)
@RunWith(AndroidJUnit4.class)
@Ignore("Flaky")
public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
public class NetworkControllerSignalTest extends NetworkControllerBaseTest {


    @Test
    @Test
    @Ignore("Flaky")
    public void testNoIconWithoutMobile() {
    public void testNoIconWithoutMobile() {
        // Turn off mobile network support.
        // Turn off mobile network support.
        Mockito.when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(false);
        Mockito.when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(false);
@@ -66,6 +66,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testNoSimsIconPresent() {
    public void testNoSimsIconPresent() {
        // No Subscriptions.
        // No Subscriptions.
        mNetworkController.mMobileSignalControllers.clear();
        mNetworkController.mMobileSignalControllers.clear();
@@ -75,6 +76,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testEmergencyOnly() {
    public void testEmergencyOnly() {
        setupDefaultSignal();
        setupDefaultSignal();
        mNetworkController.recalculateEmergency();
        mNetworkController.recalculateEmergency();
@@ -86,6 +88,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testEmergencyOnlyNoSubscriptions() {
    public void testEmergencyOnlyNoSubscriptions() {
        setupDefaultSignal();
        setupDefaultSignal();
        setSubscriptions();
        setSubscriptions();
@@ -96,6 +99,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testNoEmergencyOnlyWrongSubscription() {
    public void testNoEmergencyOnlyWrongSubscription() {
        setupDefaultSignal();
        setupDefaultSignal();
        setDefaultSubId(42);
        setDefaultSubId(42);
@@ -104,6 +108,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testNoEmengencyNoSubscriptions() {
    public void testNoEmengencyNoSubscriptions() {
        setupDefaultSignal();
        setupDefaultSignal();
        setSubscriptions();
        setSubscriptions();
@@ -114,6 +119,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testNoSimlessIconWithoutMobile() {
    public void testNoSimlessIconWithoutMobile() {
        // Turn off mobile network support.
        // Turn off mobile network support.
        Mockito.when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(false);
        Mockito.when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(false);
@@ -132,6 +138,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testSignalStrength() {
    public void testSignalStrength() {
        for (int testStrength = 0;
        for (int testStrength = 0;
                testStrength < SignalStrength.NUM_SIGNAL_STRENGTH_BINS; testStrength++) {
                testStrength < SignalStrength.NUM_SIGNAL_STRENGTH_BINS; testStrength++) {
@@ -149,6 +156,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testCdmaSignalStrength() {
    public void testCdmaSignalStrength() {
        for (int testStrength = 0;
        for (int testStrength = 0;
                testStrength < SignalStrength.NUM_SIGNAL_STRENGTH_BINS; testStrength++) {
                testStrength < SignalStrength.NUM_SIGNAL_STRENGTH_BINS; testStrength++) {
@@ -163,6 +171,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testSignalRoaming() {
    public void testSignalRoaming() {
        for (int testStrength = 0;
        for (int testStrength = 0;
                testStrength < SignalStrength.NUM_SIGNAL_STRENGTH_BINS; testStrength++) {
                testStrength < SignalStrength.NUM_SIGNAL_STRENGTH_BINS; testStrength++) {
@@ -177,6 +186,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testCdmaSignalRoaming() {
    public void testCdmaSignalRoaming() {
        for (int testStrength = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
        for (int testStrength = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
                testStrength <= SignalStrength.SIGNAL_STRENGTH_GREAT; testStrength++) {
                testStrength <= SignalStrength.SIGNAL_STRENGTH_GREAT; testStrength++) {
@@ -192,6 +202,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testQsSignalStrength() {
    public void testQsSignalStrength() {
        for (int testStrength = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
        for (int testStrength = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
                testStrength <= SignalStrength.SIGNAL_STRENGTH_GREAT; testStrength++) {
                testStrength <= SignalStrength.SIGNAL_STRENGTH_GREAT; testStrength++) {
@@ -205,6 +216,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testCdmaQsSignalStrength() {
    public void testCdmaQsSignalStrength() {
        for (int testStrength = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
        for (int testStrength = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
                testStrength <= SignalStrength.SIGNAL_STRENGTH_GREAT; testStrength++) {
                testStrength <= SignalStrength.SIGNAL_STRENGTH_GREAT; testStrength++) {
@@ -219,6 +231,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testNoBangWithWifi() {
    public void testNoBangWithWifi() {
        setupDefaultSignal();
        setupDefaultSignal();
        setConnectivity(mMobileSignalController.mTransportType, false, false);
        setConnectivity(mMobileSignalController.mTransportType, false, false);
@@ -230,6 +243,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    // Some tests of actual NetworkController code, just internals not display stuff
    // Some tests of actual NetworkController code, just internals not display stuff
    // TODO: Put this somewhere else, maybe in its own file.
    // TODO: Put this somewhere else, maybe in its own file.
    @Test
    @Test
    @Ignore("Flaky")
    public void testHasCorrectMobileControllers() {
    public void testHasCorrectMobileControllers() {
        int[] testSubscriptions = new int[] { 1, 5, 3 };
        int[] testSubscriptions = new int[] { 1, 5, 3 };
        int notTestSubscription = 0;
        int notTestSubscription = 0;
@@ -257,6 +271,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testSetCurrentSubscriptions() {
    public void testSetCurrentSubscriptions() {
        // We will not add one controller to make sure it gets created.
        // We will not add one controller to make sure it gets created.
        int indexToSkipController = 0;
        int indexToSkipController = 0;
@@ -310,6 +325,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testHistorySize() {
    public void testHistorySize() {
        // Verify valid history size, otherwise it gits printed out the wrong order and whatnot.
        // Verify valid history size, otherwise it gits printed out the wrong order and whatnot.
        assertEquals(0, SignalController.HISTORY_SIZE & (SignalController.HISTORY_SIZE - 1));
        assertEquals(0, SignalController.HISTORY_SIZE & (SignalController.HISTORY_SIZE - 1));
@@ -323,6 +339,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testOnReceive_stringsUpdatedAction_spn() {
    public void testOnReceive_stringsUpdatedAction_spn() {
        String expectedMNetworkName = "Test";
        String expectedMNetworkName = "Test";
        Intent intent = createStringsUpdatedIntent(true /* showSpn */,
        Intent intent = createStringsUpdatedIntent(true /* showSpn */,
@@ -336,6 +353,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testOnReceive_stringsUpdatedAction_plmn() {
    public void testOnReceive_stringsUpdatedAction_plmn() {
        String expectedMNetworkName = "Test";
        String expectedMNetworkName = "Test";


@@ -350,6 +368,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testOnReceive_stringsUpdatedAction_bothFalse() {
    public void testOnReceive_stringsUpdatedAction_bothFalse() {
        Intent intent = createStringsUpdatedIntent(false /* showSpn */,
        Intent intent = createStringsUpdatedIntent(false /* showSpn */,
              "Irrelevant" /* spn */,
              "Irrelevant" /* spn */,
@@ -365,6 +384,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testOnReceive_stringsUpdatedAction_bothTrueAndNull() {
    public void testOnReceive_stringsUpdatedAction_bothTrueAndNull() {
        Intent intent = createStringsUpdatedIntent(true /* showSpn */,
        Intent intent = createStringsUpdatedIntent(true /* showSpn */,
            null /* spn */,
            null /* spn */,
@@ -379,6 +399,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testOnReceive_stringsUpdatedAction_bothTrueAndNonNull() {
    public void testOnReceive_stringsUpdatedAction_bothTrueAndNonNull() {
        String spn = "Test1";
        String spn = "Test1";
        String plmn = "Test2";
        String plmn = "Test2";
@@ -413,6 +434,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testOnUpdateDataActivity_dataIn() {
    public void testOnUpdateDataActivity_dataIn() {
        setupDefaultSignal();
        setupDefaultSignal();


@@ -427,6 +449,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testOnUpdateDataActivity_dataOut() {
    public void testOnUpdateDataActivity_dataOut() {
      setupDefaultSignal();
      setupDefaultSignal();


@@ -440,6 +463,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testOnUpdateDataActivity_dataInOut() {
    public void testOnUpdateDataActivity_dataInOut() {
      setupDefaultSignal();
      setupDefaultSignal();


@@ -454,6 +478,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testOnUpdateDataActivity_dataActivityNone() {
    public void testOnUpdateDataActivity_dataActivityNone() {
      setupDefaultSignal();
      setupDefaultSignal();


@@ -468,6 +493,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testCarrierNetworkChange_carrierNetworkChange() {
    public void testCarrierNetworkChange_carrierNetworkChange() {
      int strength = SignalStrength.SIGNAL_STRENGTH_GREAT;
      int strength = SignalStrength.SIGNAL_STRENGTH_GREAT;


@@ -497,6 +523,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testCarrierNetworkChange_roamingBeforeNetworkChange() {
    public void testCarrierNetworkChange_roamingBeforeNetworkChange() {
      int strength = SignalStrength.SIGNAL_STRENGTH_GREAT;
      int strength = SignalStrength.SIGNAL_STRENGTH_GREAT;


@@ -530,6 +557,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
    }
    }


    @Test
    @Test
    @Ignore("Flaky")
    public void testCarrierNetworkChange_roamingAfterNetworkChange() {
    public void testCarrierNetworkChange_roamingAfterNetworkChange() {
      int strength = SignalStrength.SIGNAL_STRENGTH_GREAT;
      int strength = SignalStrength.SIGNAL_STRENGTH_GREAT;