Disable StatusBarTests due to flakes.
Looks like it relies on some global state. Test: runtest systemui Change-Id: If4add9e551bbaef5580df2532f937345c9e69d32
This commit is contained in:
@@ -42,7 +42,9 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@SmallTest
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
// @RunWith(AndroidJUnit4.class)
|
||||
// TODO(gpitsch): We have seen some flakes in these tests, needs some investigation.
|
||||
// Q: How is mMetricsReader being used by the tested code?
|
||||
public class StatusBarTest extends SysuiTestCase {
|
||||
|
||||
StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
|
||||
@@ -54,7 +56,7 @@ public class StatusBarTest extends SysuiTestCase {
|
||||
private MetricsReader mMetricsReader;
|
||||
private DisplayMetrics mDisplayMetrics = new DisplayMetrics();
|
||||
|
||||
@Before
|
||||
// @Before
|
||||
public void setup() {
|
||||
mStatusBarKeyguardViewManager = mock(StatusBarKeyguardViewManager.class);
|
||||
mUnlockMethodCache = mock(UnlockMethodCache.class);
|
||||
@@ -87,7 +89,7 @@ public class StatusBarTest extends SysuiTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
public void executeRunnableDismissingKeyguard_nullRunnable_showingAndOccluded() {
|
||||
when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(true);
|
||||
when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(true);
|
||||
@@ -95,7 +97,7 @@ public class StatusBarTest extends SysuiTestCase {
|
||||
mStatusBar.executeRunnableDismissingKeyguard(null, null, false, false, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
public void executeRunnableDismissingKeyguard_nullRunnable_showing() {
|
||||
when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(true);
|
||||
when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
|
||||
@@ -103,7 +105,7 @@ public class StatusBarTest extends SysuiTestCase {
|
||||
mStatusBar.executeRunnableDismissingKeyguard(null, null, false, false, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
public void executeRunnableDismissingKeyguard_nullRunnable_notShowing() {
|
||||
when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(false);
|
||||
when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
|
||||
@@ -111,7 +113,7 @@ public class StatusBarTest extends SysuiTestCase {
|
||||
mStatusBar.executeRunnableDismissingKeyguard(null, null, false, false, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
public void lockscreenStateMetrics_notShowing() {
|
||||
// uninteresting state, except that fingerprint must be non-zero
|
||||
when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
|
||||
@@ -129,7 +131,7 @@ public class StatusBarTest extends SysuiTestCase {
|
||||
.setSubtype(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
public void lockscreenStateMetrics_notShowing_secure() {
|
||||
// uninteresting state, except that fingerprint must be non-zero
|
||||
when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
|
||||
@@ -147,7 +149,7 @@ public class StatusBarTest extends SysuiTestCase {
|
||||
.setSubtype(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
public void lockscreenStateMetrics_isShowing() {
|
||||
// uninteresting state, except that fingerprint must be non-zero
|
||||
when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
|
||||
@@ -165,7 +167,7 @@ public class StatusBarTest extends SysuiTestCase {
|
||||
.setSubtype(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
public void lockscreenStateMetrics_isShowing_secure() {
|
||||
// uninteresting state, except that fingerprint must be non-zero
|
||||
when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
|
||||
@@ -183,7 +185,7 @@ public class StatusBarTest extends SysuiTestCase {
|
||||
.setSubtype(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
public void lockscreenStateMetrics_isShowingBouncer() {
|
||||
// uninteresting state, except that fingerprint must be non-zero
|
||||
when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
|
||||
@@ -201,7 +203,7 @@ public class StatusBarTest extends SysuiTestCase {
|
||||
.setSubtype(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
// @Test
|
||||
public void onActivatedMetrics() {
|
||||
ActivatableNotificationView view = mock(ActivatableNotificationView.class);
|
||||
mStatusBar.onActivated(view);
|
||||
@@ -226,4 +228,4 @@ public class StatusBarTest extends SysuiTestCase {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user