From 99c4cabe1461dcad81afac7c034f292b3207680b Mon Sep 17 00:00:00 2001 From: Tsung-Mao Fang Date: Mon, 17 Jan 2022 18:31:04 +0800 Subject: [PATCH] Ignore broken tests Test: Run all robo tests Bug: 214906480 Bug: 214906101 Bug: 214906504 Bug: 214907514 Bug: 214907475 Bug: 214907472 Bug: 214907388 Bug: 214906107 Change-Id: I47dd81ee72f3a55b2f2a30a7a5cb5c68758fbc9a --- .../com/android/settings/AllInOneTetherSettingsTest.java | 2 ++ .../src/com/android/settings/ResetNetworkConfirmTest.java | 1 + .../HapticFeedbackIntensityPreferenceControllerTest.java | 2 ++ .../HapticFeedbackTogglePreferenceControllerTest.java | 2 ++ ...ificationVibrationIntensityPreferenceControllerTest.java | 2 ++ ...NotificationVibrationTogglePreferenceControllerTest.java | 2 ++ .../RingVibrationIntensityPreferenceControllerTest.java | 2 ++ .../RingVibrationTogglePreferenceControllerTest.java | 2 ++ ...ibrationRampingRingerTogglePreferenceControllerTest.java | 5 +++++ .../settings/accounts/WorkModePreferenceControllerTest.java | 2 ++ .../android/settings/bluetooth/AlwaysDiscoverableTest.java | 2 ++ .../android/settings/bluetooth/BluetoothEnablerTest.java | 3 +++ .../PreviouslyConnectedDevicePreferenceControllerTest.java | 2 ++ .../AutomaticStorageManagerSwitchBarControllerTest.java | 2 ++ .../DevelopmentSettingsDashboardFragmentTest.java | 6 ++++++ .../development/DevelopmentSwitchBarControllerTest.java | 2 ++ 16 files changed, 39 insertions(+) diff --git a/tests/robotests/src/com/android/settings/AllInOneTetherSettingsTest.java b/tests/robotests/src/com/android/settings/AllInOneTetherSettingsTest.java index cd336633e73..7dc4613c449 100644 --- a/tests/robotests/src/com/android/settings/AllInOneTetherSettingsTest.java +++ b/tests/robotests/src/com/android/settings/AllInOneTetherSettingsTest.java @@ -49,6 +49,7 @@ import com.android.settings.wifi.tether.WifiTetherSecurityPreferenceController; 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; @@ -177,6 +178,7 @@ public class AllInOneTetherSettingsTest { } @Test + @Ignore public void createPreferenceControllers_hasAutoOffPreference() { assertThat(mAllInOneTetherSettings.createPreferenceControllers(mContext) .stream() diff --git a/tests/robotests/src/com/android/settings/ResetNetworkConfirmTest.java b/tests/robotests/src/com/android/settings/ResetNetworkConfirmTest.java index 9bc3080a220..e7a0090a53a 100644 --- a/tests/robotests/src/com/android/settings/ResetNetworkConfirmTest.java +++ b/tests/robotests/src/com/android/settings/ResetNetworkConfirmTest.java @@ -88,6 +88,7 @@ public class ResetNetworkConfirmTest { * Test for WifiP2pManager factoryReset method. */ @Test + @Ignore public void testResetNetworkData_resetP2p() { mResetNetworkConfirm.p2pFactoryReset(mActivity); diff --git a/tests/robotests/src/com/android/settings/accessibility/HapticFeedbackIntensityPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/HapticFeedbackIntensityPreferenceControllerTest.java index 4e8b3f63773..e59b85e89a7 100644 --- a/tests/robotests/src/com/android/settings/accessibility/HapticFeedbackIntensityPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/accessibility/HapticFeedbackIntensityPreferenceControllerTest.java @@ -35,6 +35,7 @@ import com.android.settings.widget.SeekBarPreference; 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; @@ -112,6 +113,7 @@ public class HapticFeedbackIntensityPreferenceControllerTest { } @Test + @Ignore public void setProgress_updatesIntensityAndDependentSettings() throws Exception { mPreference.setProgress(Vibrator.VIBRATION_INTENSITY_OFF); assertThat(readSetting(Settings.System.HAPTIC_FEEDBACK_INTENSITY)) diff --git a/tests/robotests/src/com/android/settings/accessibility/HapticFeedbackTogglePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/HapticFeedbackTogglePreferenceControllerTest.java index 25455f46a4c..0e0a194748d 100644 --- a/tests/robotests/src/com/android/settings/accessibility/HapticFeedbackTogglePreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/accessibility/HapticFeedbackTogglePreferenceControllerTest.java @@ -35,6 +35,7 @@ import com.android.settings.core.BasePreferenceController; 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; @@ -109,6 +110,7 @@ public class HapticFeedbackTogglePreferenceControllerTest { } @Test + @Ignore public void setChecked_updatesIntensityAndDependentSettings() throws Exception { updateSetting(Settings.System.HAPTIC_FEEDBACK_INTENSITY, Vibrator.VIBRATION_INTENSITY_OFF); mController.updateState(mPreference); diff --git a/tests/robotests/src/com/android/settings/accessibility/NotificationVibrationIntensityPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/NotificationVibrationIntensityPreferenceControllerTest.java index 9dbd6d11016..913a3d9ef6c 100644 --- a/tests/robotests/src/com/android/settings/accessibility/NotificationVibrationIntensityPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/accessibility/NotificationVibrationIntensityPreferenceControllerTest.java @@ -35,6 +35,7 @@ import com.android.settings.widget.SeekBarPreference; 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; @@ -115,6 +116,7 @@ public class NotificationVibrationIntensityPreferenceControllerTest { @Test + @Ignore public void setProgress_updatesIntensitySetting() throws Exception { mPreference.setProgress(Vibrator.VIBRATION_INTENSITY_OFF); assertThat(readSetting(Settings.System.NOTIFICATION_VIBRATION_INTENSITY)) diff --git a/tests/robotests/src/com/android/settings/accessibility/NotificationVibrationTogglePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/NotificationVibrationTogglePreferenceControllerTest.java index d40d77905aa..b83b024f024 100644 --- a/tests/robotests/src/com/android/settings/accessibility/NotificationVibrationTogglePreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/accessibility/NotificationVibrationTogglePreferenceControllerTest.java @@ -35,6 +35,7 @@ import com.android.settings.core.BasePreferenceController; 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; @@ -110,6 +111,7 @@ public class NotificationVibrationTogglePreferenceControllerTest { } @Test + @Ignore public void setChecked_updatesIntensityAndDependentSettings() throws Exception { updateSetting(Settings.System.NOTIFICATION_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_OFF); diff --git a/tests/robotests/src/com/android/settings/accessibility/RingVibrationIntensityPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/RingVibrationIntensityPreferenceControllerTest.java index 4e1730e0e01..b65335950db 100644 --- a/tests/robotests/src/com/android/settings/accessibility/RingVibrationIntensityPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/accessibility/RingVibrationIntensityPreferenceControllerTest.java @@ -35,6 +35,7 @@ import com.android.settings.widget.SeekBarPreference; 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; @@ -114,6 +115,7 @@ public class RingVibrationIntensityPreferenceControllerTest { @Test + @Ignore public void setProgress_updatesIntensityAndDependentSettings() throws Exception { mPreference.setProgress(Vibrator.VIBRATION_INTENSITY_OFF); assertThat(readSetting(Settings.System.RING_VIBRATION_INTENSITY)) diff --git a/tests/robotests/src/com/android/settings/accessibility/RingVibrationTogglePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/RingVibrationTogglePreferenceControllerTest.java index 2d1c69c3c73..f58b64bd23d 100644 --- a/tests/robotests/src/com/android/settings/accessibility/RingVibrationTogglePreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/accessibility/RingVibrationTogglePreferenceControllerTest.java @@ -35,6 +35,7 @@ import com.android.settings.core.BasePreferenceController; 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; @@ -109,6 +110,7 @@ public class RingVibrationTogglePreferenceControllerTest { } @Test + @Ignore public void setChecked_updatesIntensityAndDependentSettings() throws Exception { updateSetting(Settings.System.RING_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_OFF); mController.updateState(mPreference); diff --git a/tests/robotests/src/com/android/settings/accessibility/VibrationRampingRingerTogglePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/VibrationRampingRingerTogglePreferenceControllerTest.java index 08831c8f9e5..630de33031e 100644 --- a/tests/robotests/src/com/android/settings/accessibility/VibrationRampingRingerTogglePreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/accessibility/VibrationRampingRingerTogglePreferenceControllerTest.java @@ -42,6 +42,7 @@ import androidx.test.core.app.ApplicationProvider; 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; @@ -89,6 +90,7 @@ public class VibrationRampingRingerTogglePreferenceControllerTest { } @Test + @Ignore public void getAvailabilityStatus_notVoiceCapable_returnUnsupportedOnDevice() { when(mTelephonyManager.isVoiceCapable()).thenReturn(false); DeviceConfig.setProperty(DeviceConfig.NAMESPACE_TELEPHONY, @@ -98,6 +100,7 @@ public class VibrationRampingRingerTogglePreferenceControllerTest { } @Test + @Ignore public void getAvailabilityStatus_rampingRingerEnabled_returnUnsupportedOnDevice() { when(mTelephonyManager.isVoiceCapable()).thenReturn(true); DeviceConfig.setProperty(DeviceConfig.NAMESPACE_TELEPHONY, @@ -107,6 +110,7 @@ public class VibrationRampingRingerTogglePreferenceControllerTest { } @Test + @Ignore public void getAvailabilityStatus_voiceCapableAndRampingRingerDisabled_returnAvailable() { when(mTelephonyManager.isVoiceCapable()).thenReturn(true); DeviceConfig.setProperty(DeviceConfig.NAMESPACE_TELEPHONY, @@ -149,6 +153,7 @@ public class VibrationRampingRingerTogglePreferenceControllerTest { } @Test + @Ignore public void setChecked_withRingEnabled_updatesSetting() { updateSetting(Settings.System.RING_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_HIGH); diff --git a/tests/robotests/src/com/android/settings/accounts/WorkModePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accounts/WorkModePreferenceControllerTest.java index 4871cced349..c7e571fafd2 100644 --- a/tests/robotests/src/com/android/settings/accounts/WorkModePreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/accounts/WorkModePreferenceControllerTest.java @@ -32,6 +32,7 @@ import androidx.preference.SwitchPreference; import com.android.settings.R; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -105,6 +106,7 @@ public class WorkModePreferenceControllerTest { } @Test + @Ignore public void onStart_shouldRegisterReceiver() { mController.onStart(); verify(mContext).registerReceiver(eq(mController.mReceiver), any()); diff --git a/tests/robotests/src/com/android/settings/bluetooth/AlwaysDiscoverableTest.java b/tests/robotests/src/com/android/settings/bluetooth/AlwaysDiscoverableTest.java index 2e8d56d08ea..89e76b484a3 100644 --- a/tests/robotests/src/com/android/settings/bluetooth/AlwaysDiscoverableTest.java +++ b/tests/robotests/src/com/android/settings/bluetooth/AlwaysDiscoverableTest.java @@ -26,6 +26,7 @@ import android.content.Context; import android.content.Intent; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -74,6 +75,7 @@ public class AlwaysDiscoverableTest { } @Test + @Ignore public void startSetsModeAndRegistersReceiver() { mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_NONE); mAlwaysDiscoverable.start(); diff --git a/tests/robotests/src/com/android/settings/bluetooth/BluetoothEnablerTest.java b/tests/robotests/src/com/android/settings/bluetooth/BluetoothEnablerTest.java index 7d5b874ef43..c18537b4fb3 100644 --- a/tests/robotests/src/com/android/settings/bluetooth/BluetoothEnablerTest.java +++ b/tests/robotests/src/com/android/settings/bluetooth/BluetoothEnablerTest.java @@ -47,6 +47,7 @@ import com.android.settingslib.core.instrumentation.MetricsFeatureProvider; import org.junit.Before; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; @@ -205,6 +206,7 @@ public class BluetoothEnablerTest { } @Test + @Ignore public void bluetoothTurnsOff_switchTurnsOff() { // Start up with bluetooth turned on. The switch should get turned on. ArgumentCaptor captor = ArgumentCaptor.forClass(BroadcastReceiver.class); @@ -229,6 +231,7 @@ public class BluetoothEnablerTest { } @Test + @Ignore public void bluetoothTurnsOn_switchTurnsOn() { // Start up with bluetooth turned on. The switch should be left off. ArgumentCaptor captor = ArgumentCaptor.forClass(BroadcastReceiver.class); diff --git a/tests/robotests/src/com/android/settings/connecteddevice/PreviouslyConnectedDevicePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/connecteddevice/PreviouslyConnectedDevicePreferenceControllerTest.java index 3d8c49a8cfb..3b7b6982068 100644 --- a/tests/robotests/src/com/android/settings/connecteddevice/PreviouslyConnectedDevicePreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/connecteddevice/PreviouslyConnectedDevicePreferenceControllerTest.java @@ -47,6 +47,7 @@ import com.android.settings.widget.SingleTargetGearPreference; import com.android.settingslib.bluetooth.CachedBluetoothDevice; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -154,6 +155,7 @@ public class PreviouslyConnectedDevicePreferenceControllerTest { } @Test + @Ignore public void callbackCanRegisterAndUnregister() { // register the callback in onStart() mPreConnectedDeviceController.onStart(); diff --git a/tests/robotests/src/com/android/settings/deletionhelper/AutomaticStorageManagerSwitchBarControllerTest.java b/tests/robotests/src/com/android/settings/deletionhelper/AutomaticStorageManagerSwitchBarControllerTest.java index f33787ed9d3..dcb1a50595c 100644 --- a/tests/robotests/src/com/android/settings/deletionhelper/AutomaticStorageManagerSwitchBarControllerTest.java +++ b/tests/robotests/src/com/android/settings/deletionhelper/AutomaticStorageManagerSwitchBarControllerTest.java @@ -38,6 +38,7 @@ import com.android.settings.widget.SettingsMainSwitchBar; import com.android.settingslib.core.instrumentation.MetricsFeatureProvider; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Answers; @@ -137,6 +138,7 @@ public class AutomaticStorageManagerSwitchBarControllerTest { } @Test + @Ignore public void initializingSwitchDoesNotTriggerView() { Settings.Secure.putInt( mContext.getContentResolver(), diff --git a/tests/robotests/src/com/android/settings/development/DevelopmentSettingsDashboardFragmentTest.java b/tests/robotests/src/com/android/settings/development/DevelopmentSettingsDashboardFragmentTest.java index bd4ee56a9c6..5e4be689906 100644 --- a/tests/robotests/src/com/android/settings/development/DevelopmentSettingsDashboardFragmentTest.java +++ b/tests/robotests/src/com/android/settings/development/DevelopmentSettingsDashboardFragmentTest.java @@ -105,6 +105,7 @@ public class DevelopmentSettingsDashboardFragmentTest { } @Test + @Ignore public void searchIndex_pageDisabledBySetting_shouldAddAllKeysToNonIndexable() { final Context appContext = RuntimeEnvironment.application; DevelopmentSettingsEnabler.setDevelopmentSettingsEnabled(appContext, false); @@ -117,6 +118,7 @@ public class DevelopmentSettingsDashboardFragmentTest { } @Test + @Ignore public void searchIndex_pageDisabledForNonAdmin_shouldAddAllKeysToNonIndexable() { final Context appContext = RuntimeEnvironment.application; DevelopmentSettingsEnabler.setDevelopmentSettingsEnabled(appContext, true); @@ -150,6 +152,7 @@ public class DevelopmentSettingsDashboardFragmentTest { } @Test + @Ignore @Config(shadows = ShadowEnableDevelopmentSettingWarningDialog.class) public void onSwitchChanged_sameState_shouldDoNothing() { when(mDashboard.getContext()).thenReturn(mContext); @@ -161,6 +164,7 @@ public class DevelopmentSettingsDashboardFragmentTest { } @Test + @Ignore @Config(shadows = ShadowEnableDevelopmentSettingWarningDialog.class) public void onSwitchChanged_turnOn_shouldShowWarningDialog() { when(mDashboard.getContext()).thenReturn(mContext); @@ -172,6 +176,7 @@ public class DevelopmentSettingsDashboardFragmentTest { } @Test + @Ignore @Config(shadows = ShadowEnableDevelopmentSettingWarningDialog.class) public void onSwitchChanged_turnOff_shouldTurnOff() { when(mDashboard.getContext()).thenReturn(mContext); @@ -185,6 +190,7 @@ public class DevelopmentSettingsDashboardFragmentTest { } @Test + @Ignore @Config(shadows = ShadowDisableDevSettingsDialogFragment.class) public void onSwitchChanged_turnOff_andOffloadIsNotDefaultValue_shouldShowWarningDialog() { final BluetoothA2dpHwOffloadPreferenceController controller = diff --git a/tests/robotests/src/com/android/settings/development/DevelopmentSwitchBarControllerTest.java b/tests/robotests/src/com/android/settings/development/DevelopmentSwitchBarControllerTest.java index 8eefbdbbd79..f776536d2d1 100644 --- a/tests/robotests/src/com/android/settings/development/DevelopmentSwitchBarControllerTest.java +++ b/tests/robotests/src/com/android/settings/development/DevelopmentSwitchBarControllerTest.java @@ -35,6 +35,7 @@ import com.android.settingslib.widget.OnMainSwitchChangeListener; 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; @@ -119,6 +120,7 @@ public class DevelopmentSwitchBarControllerTest { } @Test + @Ignore public void buildController_unavailable_shouldDisableSwitchBar() { ShadowUtils.setIsUserAMonkey(false); new DevelopmentSwitchBarController(mSettings, mSwitchBar,