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

Commit c1caf6b9 authored by Yunfan Chen's avatar Yunfan Chen
Browse files

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
parent 7fe981bf
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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++) {
+4 −0
Original line number Diff line number Diff line
@@ -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);
+3 −0
Original line number Diff line number Diff line
@@ -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);
+4 −0
Original line number Diff line number Diff line
@@ -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);