From f44ea077d6b553c0122250525906a586cf61ae4f Mon Sep 17 00:00:00 2001 From: Fan Wu Date: Thu, 9 May 2024 11:08:05 +0800 Subject: [PATCH] Ignore existing failed tests and promote SettingsUnitTests to Presubmit. Exclude a few tests from Presubmit as they are failing in Presubmit but can pass locally. Bug: 339533415 Test: atest and presubmit Change-Id: Icdc94195f3b4dda4e523d4b7498698a5ada198ea --- TEST_MAPPING | 35 +++++++++---------- .../ApprovalPreferenceControllerTest.java | 2 ++ .../bluetooth/QrCodeScanModeActivityTest.java | 3 +- .../CommunalPreferenceControllerTest.java | 2 ++ .../ThreadNetworkFragmentControllerTest.kt | 2 ++ .../ThreadNetworkToggleControllerTest.kt | 3 ++ .../datausage/CellDataPreferenceTest.java | 2 ++ ...toothStackLogPreferenceControllerTest.java | 2 ++ .../SimStatusDialogControllerTest.java | 2 ++ .../storage/StorageAsyncLoaderTest.java | 2 ++ .../ScreenResolutionControllerTest.java | 3 ++ .../fuelgauge/batterytip/AppInfoTest.java | 2 ++ .../ContextualCardLookupTableTest.java | 2 ++ .../TermsOfAddressFeminineControllerTest.java | 2 ++ ...TermsOfAddressMasculineControllerTest.java | 2 ++ .../TermsOfAddressNeutralControllerTest.java | 2 ++ ...msOfAddressNotSpecifiedControllerTest.java | 2 ++ .../network/SubscriptionUtilTest.java | 1 + .../settings/network/UiccSlotUtilTest.java | 2 ++ .../network/telephony/CellInfoUtilTest.kt | 3 ++ ...edNetworkModePreferenceControllerTest.java | 5 +++ .../NetworkProviderWifiCallingGroupTest.java | 2 ++ ...vancedCallingPreferenceControllerTest.java | 2 ++ ...aSystemSelectPreferenceControllerTest.java | 4 +++ .../privacy/PrivacyDashboardActivityTest.java | 2 ++ 25 files changed, 71 insertions(+), 20 deletions(-) diff --git a/TEST_MAPPING b/TEST_MAPPING index f84565fa8ed..4b857526fd8 100644 --- a/TEST_MAPPING +++ b/TEST_MAPPING @@ -6,25 +6,22 @@ { "name": "SettingsUnitTests", "options": [ - { - "include-filter": "com.android.settings.biometrics" - }, - { - "include-filter": "com.android.settings.biometrics2" - }, - { - "include-filter": "com.android.settings.password" - }, - { - "include-filter": "com.android.settings.privatespace" - }, - { - "include-filter": "com.android.settings.safetycenter" - }, - { - "include-filter": "com.android.settings.security" - } - ] + { + "exclude-filter": "com.android.settings.fuelgauge.batterysaver" + }, + { + "exclude-filter": "com.android.settings.network.telephony" + }, + { + "exclude-filter": "com.android.settings.privatespace" + }, + { + "exclude-filter": "com.android.settings.regionalpreferences" + }, + { + "exclude-filter": "com.android.settings.vpn2" + } + ] } ], "postsubmit": [ diff --git a/tests/unit/src/com/android/settings/applications/specialaccess/notificationaccess/ApprovalPreferenceControllerTest.java b/tests/unit/src/com/android/settings/applications/specialaccess/notificationaccess/ApprovalPreferenceControllerTest.java index eb236854450..ac86eb071f2 100644 --- a/tests/unit/src/com/android/settings/applications/specialaccess/notificationaccess/ApprovalPreferenceControllerTest.java +++ b/tests/unit/src/com/android/settings/applications/specialaccess/notificationaccess/ApprovalPreferenceControllerTest.java @@ -50,6 +50,7 @@ import com.android.settingslib.RestrictedSwitchPreference; import org.junit.Assert; import org.junit.Before; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -188,6 +189,7 @@ public class ApprovalPreferenceControllerTest { @Test @EnableFlags(Flags.FLAG_MODES_API) + @Ignore("b/339550695") public void disable() { mController.disable(mCn); verify(mFeatureFactory.metricsFeatureProvider).action( diff --git a/tests/unit/src/com/android/settings/bluetooth/QrCodeScanModeActivityTest.java b/tests/unit/src/com/android/settings/bluetooth/QrCodeScanModeActivityTest.java index 56764e3a145..ab77f2f31b6 100644 --- a/tests/unit/src/com/android/settings/bluetooth/QrCodeScanModeActivityTest.java +++ b/tests/unit/src/com/android/settings/bluetooth/QrCodeScanModeActivityTest.java @@ -18,7 +18,6 @@ package com.android.settings.bluetooth; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; import android.content.Intent; @@ -28,11 +27,13 @@ import androidx.test.platform.app.InstrumentationRegistry; import com.android.settingslib.bluetooth.BluetoothBroadcastUtils; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @RunWith(AndroidJUnit4.class) +@Ignore("b/337418017") public class QrCodeScanModeActivityTest { @Mock diff --git a/tests/unit/src/com/android/settings/communal/CommunalPreferenceControllerTest.java b/tests/unit/src/com/android/settings/communal/CommunalPreferenceControllerTest.java index 4d84765e188..6bd84f0064b 100644 --- a/tests/unit/src/com/android/settings/communal/CommunalPreferenceControllerTest.java +++ b/tests/unit/src/com/android/settings/communal/CommunalPreferenceControllerTest.java @@ -32,12 +32,14 @@ import com.android.settings.Utils; import com.android.settings.testutils.ResourcesUtils; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @RunWith(AndroidJUnit4.class) +@Ignore("b/337417918") public class CommunalPreferenceControllerTest { @Mock private UserManager mUserManager; diff --git a/tests/unit/src/com/android/settings/connecteddevice/threadnetwork/ThreadNetworkFragmentControllerTest.kt b/tests/unit/src/com/android/settings/connecteddevice/threadnetwork/ThreadNetworkFragmentControllerTest.kt index 0d57dafc144..d999464dddb 100644 --- a/tests/unit/src/com/android/settings/connecteddevice/threadnetwork/ThreadNetworkFragmentControllerTest.kt +++ b/tests/unit/src/com/android/settings/connecteddevice/threadnetwork/ThreadNetworkFragmentControllerTest.kt @@ -34,6 +34,7 @@ import org.junit.runner.RunWith import org.mockito.Mockito.mock import org.mockito.Mockito.spy import java.util.concurrent.Executor +import org.junit.Ignore /** Unit tests for [ThreadNetworkFragmentController]. */ @RunWith(AndroidJUnit4::class) @@ -99,6 +100,7 @@ class ThreadNetworkFragmentControllerTest { } @Test + @Ignore("b/339767488") fun getSummary_ThreadIsDisabled_returnsOff() { startController(controller) fakeThreadNetworkController.setEnabled(false, executor) {} diff --git a/tests/unit/src/com/android/settings/connecteddevice/threadnetwork/ThreadNetworkToggleControllerTest.kt b/tests/unit/src/com/android/settings/connecteddevice/threadnetwork/ThreadNetworkToggleControllerTest.kt index 329e7416d44..93ade562cfb 100644 --- a/tests/unit/src/com/android/settings/connecteddevice/threadnetwork/ThreadNetworkToggleControllerTest.kt +++ b/tests/unit/src/com/android/settings/connecteddevice/threadnetwork/ThreadNetworkToggleControllerTest.kt @@ -35,6 +35,7 @@ import org.junit.runner.RunWith import org.mockito.Mockito.mock import org.mockito.Mockito.spy import java.util.concurrent.Executor +import org.junit.Ignore /** Unit tests for [ThreadNetworkToggleController]. */ @RunWith(AndroidJUnit4::class) @@ -89,6 +90,7 @@ class ThreadNetworkToggleControllerTest { } @Test + @Ignore("b/339767488") fun isChecked_threadSetEnabled_returnsTrue() { fakeThreadNetworkController.setEnabled(true, executor) { } startController(controller) @@ -114,6 +116,7 @@ class ThreadNetworkToggleControllerTest { } @Test + @Ignore("b/339767488") fun setChecked_setUnchecked_threadIsDisabled() { startController(controller) diff --git a/tests/unit/src/com/android/settings/datausage/CellDataPreferenceTest.java b/tests/unit/src/com/android/settings/datausage/CellDataPreferenceTest.java index 93ca87577cf..60e09f3220c 100644 --- a/tests/unit/src/com/android/settings/datausage/CellDataPreferenceTest.java +++ b/tests/unit/src/com/android/settings/datausage/CellDataPreferenceTest.java @@ -28,12 +28,14 @@ import androidx.test.core.app.ApplicationProvider; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @RunWith(AndroidJUnit4.class) +@Ignore("b/337417779") public class CellDataPreferenceTest { @Mock diff --git a/tests/unit/src/com/android/settings/development/bluetooth/BluetoothStackLogPreferenceControllerTest.java b/tests/unit/src/com/android/settings/development/bluetooth/BluetoothStackLogPreferenceControllerTest.java index 0811f0499e3..ab1f46926fa 100644 --- a/tests/unit/src/com/android/settings/development/bluetooth/BluetoothStackLogPreferenceControllerTest.java +++ b/tests/unit/src/com/android/settings/development/bluetooth/BluetoothStackLogPreferenceControllerTest.java @@ -37,12 +37,14 @@ import androidx.test.core.app.ApplicationProvider; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.MockitoAnnotations; @RunWith(AndroidJUnit4.class) +@Ignore("b/339148064") public class BluetoothStackLogPreferenceControllerTest { private static final String TAG = "BluetoothStackLogPreferenceControllerTest"; diff --git a/tests/unit/src/com/android/settings/deviceinfo/simstatus/SimStatusDialogControllerTest.java b/tests/unit/src/com/android/settings/deviceinfo/simstatus/SimStatusDialogControllerTest.java index 1eb670f5d21..556e1a7284e 100644 --- a/tests/unit/src/com/android/settings/deviceinfo/simstatus/SimStatusDialogControllerTest.java +++ b/tests/unit/src/com/android/settings/deviceinfo/simstatus/SimStatusDialogControllerTest.java @@ -217,6 +217,7 @@ public class SimStatusDialogControllerTest { } @Test + @Ignore("b/337417520") public void initialize_updateServiceStateWithPowerOff_shouldUpdateTextAndResetSignalStrength() { when(mServiceState.getState()).thenReturn(ServiceState.STATE_POWER_OFF); @@ -229,6 +230,7 @@ public class SimStatusDialogControllerTest { } @Test + @Ignore("b/337417520") public void initialize_updateVoiceDataOutOfService_shouldUpdateSettingAndResetSignalStrength() { when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegistrationState()).thenReturn( diff --git a/tests/unit/src/com/android/settings/deviceinfo/storage/StorageAsyncLoaderTest.java b/tests/unit/src/com/android/settings/deviceinfo/storage/StorageAsyncLoaderTest.java index cad68e1d77c..9679275b77e 100644 --- a/tests/unit/src/com/android/settings/deviceinfo/storage/StorageAsyncLoaderTest.java +++ b/tests/unit/src/com/android/settings/deviceinfo/storage/StorageAsyncLoaderTest.java @@ -46,6 +46,7 @@ import com.android.settings.R; import com.android.settingslib.applications.StorageStatsSource; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -172,6 +173,7 @@ public class StorageAsyncLoaderTest { } @Test + @Ignore("b/337417819") public void testRemovedPackageDoesNotCrash() throws Exception { ApplicationInfo info = new ApplicationInfo(); info.packageName = PACKAGE_NAME_1; diff --git a/tests/unit/src/com/android/settings/display/ScreenResolutionControllerTest.java b/tests/unit/src/com/android/settings/display/ScreenResolutionControllerTest.java index b5df3a24472..ff1e137df12 100644 --- a/tests/unit/src/com/android/settings/display/ScreenResolutionControllerTest.java +++ b/tests/unit/src/com/android/settings/display/ScreenResolutionControllerTest.java @@ -30,6 +30,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import com.android.settings.core.BasePreferenceController; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -49,6 +50,7 @@ public class ScreenResolutionControllerTest { } @Test + @Ignore("b/337417619") public void getAvailabilityStatus_hasFhdAndQhdModes_returnAvailable() { Display.Mode modeA = new Display.Mode(0, mHighWidth, 0, 0); Display.Mode modeB = new Display.Mode(0, mFullWidth, 0, 0); @@ -76,6 +78,7 @@ public class ScreenResolutionControllerTest { } @Test + @Ignore("b/337417619") public void updateState_FullResolution_shouldSetSummaryToFullResolution() { int width = mFullWidth; doReturn(width).when(mController).getDisplayWidth(); diff --git a/tests/unit/src/com/android/settings/fuelgauge/batterytip/AppInfoTest.java b/tests/unit/src/com/android/settings/fuelgauge/batterytip/AppInfoTest.java index 069f1231a78..26288ab17fd 100644 --- a/tests/unit/src/com/android/settings/fuelgauge/batterytip/AppInfoTest.java +++ b/tests/unit/src/com/android/settings/fuelgauge/batterytip/AppInfoTest.java @@ -24,6 +24,7 @@ import android.text.format.DateUtils; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -32,6 +33,7 @@ import java.util.Collections; import java.util.List; @RunWith(AndroidJUnit4.class) +@Ignore("b/337418011") public class AppInfoTest { private static final String PACKAGE_NAME = "com.android.app"; diff --git a/tests/unit/src/com/android/settings/homepage/contextualcards/ContextualCardLookupTableTest.java b/tests/unit/src/com/android/settings/homepage/contextualcards/ContextualCardLookupTableTest.java index a7acffcaf9c..ddec83be87b 100644 --- a/tests/unit/src/com/android/settings/homepage/contextualcards/ContextualCardLookupTableTest.java +++ b/tests/unit/src/com/android/settings/homepage/contextualcards/ContextualCardLookupTableTest.java @@ -24,6 +24,7 @@ import com.android.settings.homepage.contextualcards.ContextualCardLookupTable.C import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -31,6 +32,7 @@ import java.util.ArrayList; import java.util.List; @RunWith(AndroidJUnit4.class) +@Ignore("b/337417898") public class ContextualCardLookupTableTest { private static final int UNSUPPORTED_CARD_TYPE = -99999; diff --git a/tests/unit/src/com/android/settings/localepicker/TermsOfAddressFeminineControllerTest.java b/tests/unit/src/com/android/settings/localepicker/TermsOfAddressFeminineControllerTest.java index ca39f8193b0..246fad62af9 100644 --- a/tests/unit/src/com/android/settings/localepicker/TermsOfAddressFeminineControllerTest.java +++ b/tests/unit/src/com/android/settings/localepicker/TermsOfAddressFeminineControllerTest.java @@ -34,6 +34,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import com.android.settings.widget.TickButtonPreference; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.MockitoAnnotations; @@ -92,6 +93,7 @@ public class TermsOfAddressFeminineControllerTest { } @Test + @Ignore("b/339543490") public void displayPreference_setGrammaticalGenderIsFeminine_FeminineIsSelected() { TickButtonPreference selectedPreference = (TickButtonPreference) mPreferenceScreen.getPreference(2); diff --git a/tests/unit/src/com/android/settings/localepicker/TermsOfAddressMasculineControllerTest.java b/tests/unit/src/com/android/settings/localepicker/TermsOfAddressMasculineControllerTest.java index c4575150597..f5ed3959b76 100644 --- a/tests/unit/src/com/android/settings/localepicker/TermsOfAddressMasculineControllerTest.java +++ b/tests/unit/src/com/android/settings/localepicker/TermsOfAddressMasculineControllerTest.java @@ -34,6 +34,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import com.android.settings.widget.TickButtonPreference; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.MockitoAnnotations; @@ -92,6 +93,7 @@ public class TermsOfAddressMasculineControllerTest { } @Test + @Ignore("b/339543490") public void displayPreference_setGrammaticalGenderIsMasculine_MasculineIsSelected() { TickButtonPreference selectedPreference = (TickButtonPreference) mPreferenceScreen.getPreference(3); diff --git a/tests/unit/src/com/android/settings/localepicker/TermsOfAddressNeutralControllerTest.java b/tests/unit/src/com/android/settings/localepicker/TermsOfAddressNeutralControllerTest.java index 757eb779ac0..0e53198188e 100644 --- a/tests/unit/src/com/android/settings/localepicker/TermsOfAddressNeutralControllerTest.java +++ b/tests/unit/src/com/android/settings/localepicker/TermsOfAddressNeutralControllerTest.java @@ -34,6 +34,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import com.android.settings.widget.TickButtonPreference; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.MockitoAnnotations; @@ -92,6 +93,7 @@ public class TermsOfAddressNeutralControllerTest { } @Test + @Ignore("b/339543490") public void displayPreference_setGrammaticalGenderIsNotSpecified_NeutralIsSelected() { TickButtonPreference selectedPreference = (TickButtonPreference) mPreferenceScreen.getPreference(4); diff --git a/tests/unit/src/com/android/settings/localepicker/TermsOfAddressNotSpecifiedControllerTest.java b/tests/unit/src/com/android/settings/localepicker/TermsOfAddressNotSpecifiedControllerTest.java index f53c5f68e6e..96bac08dde1 100644 --- a/tests/unit/src/com/android/settings/localepicker/TermsOfAddressNotSpecifiedControllerTest.java +++ b/tests/unit/src/com/android/settings/localepicker/TermsOfAddressNotSpecifiedControllerTest.java @@ -34,6 +34,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import com.android.settings.widget.TickButtonPreference; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.MockitoAnnotations; @@ -92,6 +93,7 @@ public class TermsOfAddressNotSpecifiedControllerTest { } @Test + @Ignore("b/339543490") public void displayPreference_setGrammaticalGenderIsNotSpecified_NotSpecifiedIsSelected() { TickButtonPreference selectedPreference = (TickButtonPreference) mPreferenceScreen.getPreference(1); diff --git a/tests/unit/src/com/android/settings/network/SubscriptionUtilTest.java b/tests/unit/src/com/android/settings/network/SubscriptionUtilTest.java index 0de09076683..f012388dc84 100644 --- a/tests/unit/src/com/android/settings/network/SubscriptionUtilTest.java +++ b/tests/unit/src/com/android/settings/network/SubscriptionUtilTest.java @@ -572,6 +572,7 @@ public class SubscriptionUtilTest { } @Test + @Ignore("b/339149463") public void isSimHardwareVisible_configAsVisible_returnTrue() { when(mResources.getBoolean(R.bool.config_show_sim_info)) .thenReturn(true); diff --git a/tests/unit/src/com/android/settings/network/UiccSlotUtilTest.java b/tests/unit/src/com/android/settings/network/UiccSlotUtilTest.java index 75c49b35016..1a895b3d0fd 100644 --- a/tests/unit/src/com/android/settings/network/UiccSlotUtilTest.java +++ b/tests/unit/src/com/android/settings/network/UiccSlotUtilTest.java @@ -41,6 +41,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import com.google.common.collect.ImmutableList; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -753,6 +754,7 @@ public class UiccSlotUtilTest { } @Test + @Ignore("b/337417975") public void onReceiveSimCardStateChangeReceiver_receiveAction_timerCountDown() { CountDownLatch latch = spy(new CountDownLatch(1)); UiccSlotUtil.SimCardStateChangeReceiver receive = diff --git a/tests/unit/src/com/android/settings/network/telephony/CellInfoUtilTest.kt b/tests/unit/src/com/android/settings/network/telephony/CellInfoUtilTest.kt index c3c61888d9b..d1d4a48d324 100644 --- a/tests/unit/src/com/android/settings/network/telephony/CellInfoUtilTest.kt +++ b/tests/unit/src/com/android/settings/network/telephony/CellInfoUtilTest.kt @@ -25,6 +25,7 @@ import com.android.internal.telephony.OperatorInfo import com.android.settings.network.telephony.CellInfoUtil.getNetworkTitle import com.android.settings.network.telephony.CellInfoUtil.getOperatorNumeric import com.google.common.truth.Truth.assertThat +import org.junit.Ignore import org.junit.Test import org.junit.runner.RunWith @@ -96,6 +97,7 @@ class CellInfoUtilTest { } @Test + @Ignore("b/337417936") fun convertOperatorInfoToCellInfo() { val operatorInfo = OperatorInfo(LONG, SHORT, "12301") @@ -108,6 +110,7 @@ class CellInfoUtilTest { } @Test + @Ignore("b/337417222") fun cellInfoListToString() { val cellInfoList = listOf( diff --git a/tests/unit/src/com/android/settings/network/telephony/EnabledNetworkModePreferenceControllerTest.java b/tests/unit/src/com/android/settings/network/telephony/EnabledNetworkModePreferenceControllerTest.java index 1b337cadf8d..85c5c6b8f6c 100644 --- a/tests/unit/src/com/android/settings/network/telephony/EnabledNetworkModePreferenceControllerTest.java +++ b/tests/unit/src/com/android/settings/network/telephony/EnabledNetworkModePreferenceControllerTest.java @@ -60,6 +60,7 @@ import com.android.settings.network.telephony.TelephonyConstants.TelephonyManage import com.android.settingslib.core.lifecycle.Lifecycle; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -346,6 +347,7 @@ public class EnabledNetworkModePreferenceControllerTest { @UiThreadTest @Test + @Ignore("b/337418033") public void updateState_updateByNetworkMode() { mockEnabledNetworkMode(TelephonyManagerConstants.NETWORK_MODE_TDSCDMA_GSM_WCDMA); @@ -377,6 +379,7 @@ public class EnabledNetworkModePreferenceControllerTest { @UiThreadTest @Test + @Ignore("b/337418033") public void onPreferenceChange_updateSuccess() { mockEnabledNetworkMode(TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA); doReturn(true).when(mTelephonyManager).setPreferredNetworkTypeBitmask( @@ -393,6 +396,7 @@ public class EnabledNetworkModePreferenceControllerTest { @UiThreadTest @Test + @Ignore("b/337418033") public void onPreferenceChange_updateFail() { mockEnabledNetworkMode(TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA); doReturn(false).when(mTelephonyManager).setPreferredNetworkTypeBitmask( @@ -408,6 +412,7 @@ public class EnabledNetworkModePreferenceControllerTest { @UiThreadTest @Test + @Ignore("b/337418033") public void preferredNetworkModeNotification_preferenceUpdates() { final PreferenceManager preferenceManager = new PreferenceManager(mContext); diff --git a/tests/unit/src/com/android/settings/network/telephony/NetworkProviderWifiCallingGroupTest.java b/tests/unit/src/com/android/settings/network/telephony/NetworkProviderWifiCallingGroupTest.java index 95f83900574..2165bc9a088 100644 --- a/tests/unit/src/com/android/settings/network/telephony/NetworkProviderWifiCallingGroupTest.java +++ b/tests/unit/src/com/android/settings/network/telephony/NetworkProviderWifiCallingGroupTest.java @@ -48,6 +48,7 @@ import com.android.settings.network.ims.MockWfcQueryImsState; import com.android.settingslib.core.lifecycle.Lifecycle; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -176,6 +177,7 @@ public class NetworkProviderWifiCallingGroupTest { } @Test + @Ignore("b/337417499") public void shouldShowWifiCallingForSub_wifiCallingEnabledWithActivityHandleIntent_returnTrue() { buildPhoneAccountConfigureIntent(true); diff --git a/tests/unit/src/com/android/settings/network/telephony/NrAdvancedCallingPreferenceControllerTest.java b/tests/unit/src/com/android/settings/network/telephony/NrAdvancedCallingPreferenceControllerTest.java index bed8ef1506f..e4c486f6487 100644 --- a/tests/unit/src/com/android/settings/network/telephony/NrAdvancedCallingPreferenceControllerTest.java +++ b/tests/unit/src/com/android/settings/network/telephony/NrAdvancedCallingPreferenceControllerTest.java @@ -38,6 +38,7 @@ import com.android.settings.network.CarrierConfigCache; import com.android.settingslib.RestrictedSwitchPreference; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -180,6 +181,7 @@ public class NrAdvancedCallingPreferenceControllerTest { } @Test + @Ignore("b/339542743") public void updateState_configOn_prefChecked() { doReturn(TelephonyManager.ENABLE_VONR_SUCCESS).when( mTelephonyManager).setVoNrEnabled(anyBoolean()); diff --git a/tests/unit/src/com/android/settings/network/telephony/cdma/CdmaSystemSelectPreferenceControllerTest.java b/tests/unit/src/com/android/settings/network/telephony/cdma/CdmaSystemSelectPreferenceControllerTest.java index 8cff38e1f31..2b886c19eab 100644 --- a/tests/unit/src/com/android/settings/network/telephony/cdma/CdmaSystemSelectPreferenceControllerTest.java +++ b/tests/unit/src/com/android/settings/network/telephony/cdma/CdmaSystemSelectPreferenceControllerTest.java @@ -38,6 +38,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -99,6 +100,7 @@ public class CdmaSystemSelectPreferenceControllerTest { } @Test + @Ignore("b/337417544") public void updateState_stateHome_displayHome() { doReturn(TelephonyManager.CDMA_ROAMING_MODE_HOME).when( mTelephonyManager).getCdmaRoamingMode(); @@ -110,6 +112,7 @@ public class CdmaSystemSelectPreferenceControllerTest { } @Test + @Ignore("b/337417897") public void updateState_LteGSMWcdma_disabled() { doReturn(TelephonyManager.CDMA_ROAMING_MODE_HOME).when( mTelephonyManager).getCdmaRoamingMode(); @@ -123,6 +126,7 @@ public class CdmaSystemSelectPreferenceControllerTest { } @Test + @Ignore("b/337417917") public void updateState_stateOther_resetToDefault() { Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.CDMA_ROAMING_MODE, diff --git a/tests/unit/src/com/android/settings/privacy/PrivacyDashboardActivityTest.java b/tests/unit/src/com/android/settings/privacy/PrivacyDashboardActivityTest.java index ae42c849837..99e9ab95c8c 100644 --- a/tests/unit/src/com/android/settings/privacy/PrivacyDashboardActivityTest.java +++ b/tests/unit/src/com/android/settings/privacy/PrivacyDashboardActivityTest.java @@ -36,6 +36,7 @@ import com.android.settings.SettingsActivity; import com.android.settings.safetycenter.SafetyCenterManagerWrapper; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; @@ -58,6 +59,7 @@ public class PrivacyDashboardActivityTest { } @Test + @Ignore("b/339544085") public void onCreate_whenSafetyCenterEnabled_redirectsToSafetyCenter() throws Exception { startActivityUsingIntent(android.provider.Settings.ACTION_PRIVACY_SETTINGS); when(mSafetyCenterManagerWrapper.isEnabled(any(Context.class))).thenReturn(true);