Mark flaky pre-submit tests

All these tests caused more than 5 flakes in the past week, together
raise the WM presubmit flaky rate to as high as 10%.

Bug: 74078662
Test: presubmit
Change-Id: I9527bff6a0980bd2f6f508f7dd7742b9c2e10f14
This commit is contained in:
Yunfan Chen
2019-04-12 13:58:51 +09:00
parent 7fe981bf9e
commit c1caf6b93a
4 changed files with 13 additions and 0 deletions

View File

@@ -52,6 +52,7 @@ import android.view.Display;
import android.view.Surface;
import android.view.WindowManager;
import androidx.test.filters.FlakyTest;
import androidx.test.filters.SmallTest;
import org.junit.Before;
@@ -383,6 +384,7 @@ public class AppWindowTokenTests extends WindowTestsBase {
}
@Test
@FlakyTest(bugId = 130392471)
public void testAddRemoveRace() {
// There was once a race condition between adding and removing starting windows
for (int i = 0; i < 1000; i++) {

View File

@@ -48,6 +48,7 @@ import android.platform.test.annotations.Presubmit;
import android.util.Log;
import android.view.IWindowManager;
import androidx.test.filters.FlakyTest;
import androidx.test.filters.MediumTest;
import com.android.server.am.AssistDataRequester;
@@ -150,6 +151,7 @@ public class AssistDataRequesterTest extends ActivityTestsBase {
}
@Test
@FlakyTest(bugId = 130388718)
public void testRequestData() throws Exception {
setupMocks(CURRENT_ACTIVITY_ASSIST_ALLOWED, CALLER_ASSIST_STRUCTURE_ALLOWED,
CALLER_ASSIST_SCREENSHOT_ALLOWED);
@@ -250,6 +252,7 @@ public class AssistDataRequesterTest extends ActivityTestsBase {
}
@Test
@FlakyTest(bugId = 130388718)
public void testNoFetchScreenshots_expectNoScreenshotCallbacks() throws Exception {
setupMocks(CURRENT_ACTIVITY_ASSIST_ALLOWED, CALLER_ASSIST_STRUCTURE_ALLOWED,
CALLER_ASSIST_SCREENSHOT_ALLOWED);
@@ -260,6 +263,7 @@ public class AssistDataRequesterTest extends ActivityTestsBase {
}
@Test
@FlakyTest(bugId = 130388718)
public void testDisallowAssistScreenshot_expectNullScreenshotCallback() throws Exception {
setupMocks(CURRENT_ACTIVITY_ASSIST_ALLOWED, CALLER_ASSIST_STRUCTURE_ALLOWED,
!CALLER_ASSIST_SCREENSHOT_ALLOWED);

View File

@@ -39,6 +39,7 @@ import android.platform.test.annotations.Presubmit;
import android.support.test.uiautomator.UiDevice;
import android.text.TextUtils;
import androidx.test.filters.FlakyTest;
import androidx.test.filters.MediumTest;
import com.android.internal.annotations.GuardedBy;
@@ -78,6 +79,7 @@ public class TaskStackChangedListenerTest {
@Test
@Presubmit
@FlakyTest(bugId = 130388819)
public void testTaskStackChanged_afterFinish() throws Exception {
registerTaskStackChangedListener(new TaskStackListener() {
@Override
@@ -159,6 +161,7 @@ public class TaskStackChangedListenerTest {
*/
@Test
@Presubmit
@FlakyTest(bugId = 130388819)
public void testTaskChangeCallBacks() throws Exception {
final Object[] params = new Object[2];
final CountDownLatch taskCreatedLaunchLatch = new CountDownLatch(1);

View File

@@ -36,6 +36,7 @@ import android.view.Gravity;
import android.view.IWindow;
import android.view.WindowManager;
import androidx.test.filters.FlakyTest;
import androidx.test.filters.SmallTest;
import com.android.server.wm.utils.WmDisplayCutout;
@@ -323,6 +324,7 @@ public class WindowFrameTests extends WindowTestsBase {
}
@Test
@FlakyTest(bugId = 130388666)
public void testCalculatePolicyCrop() {
final FrameTestWindowState w = createWindow(MATCH_PARENT, MATCH_PARENT);
w.mAttrs.gravity = Gravity.LEFT | Gravity.TOP;
@@ -423,6 +425,7 @@ public class WindowFrameTests extends WindowTestsBase {
}
@Test
@FlakyTest(bugId = 130388666)
public void testDisplayCutout() {
// Regular fullscreen task and window
WindowState w = createWindow(MATCH_PARENT, MATCH_PARENT);
@@ -446,6 +449,7 @@ public class WindowFrameTests extends WindowTestsBase {
}
@Test
@FlakyTest(bugId = 130388666)
public void testDisplayCutout_tempDisplayedBounds() {
// Regular fullscreen task and window
WindowState w = createWindow(MATCH_PARENT, MATCH_PARENT);