Suppress flaky tests
Bug: 179770443
Bug: 187828770
Bug: 187830562
Bug: 187831733
Test: SwipeTest, TransactionExecutorTest, TextSelectionColorScreenshotTest
Change-Id: Ib49744bc3305121a18c7fe55da90d4dc859fcc4a
diff --git a/appsearch/appsearch/src/androidTest/java/androidx/appsearch/app/cts/AppSearchSessionLocalCtsTest.java b/appsearch/appsearch/src/androidTest/java/androidx/appsearch/app/cts/AppSearchSessionLocalCtsTest.java
index 541cd5a..753e81b 100644
--- a/appsearch/appsearch/src/androidTest/java/androidx/appsearch/app/cts/AppSearchSessionLocalCtsTest.java
+++ b/appsearch/appsearch/src/androidTest/java/androidx/appsearch/app/cts/AppSearchSessionLocalCtsTest.java
@@ -22,9 +22,12 @@
import androidx.appsearch.app.AppSearchSession;
import androidx.appsearch.localstorage.LocalStorage;
import androidx.test.core.app.ApplicationProvider;
+import androidx.test.filters.FlakyTest;
import com.google.common.util.concurrent.ListenableFuture;
+import org.junit.Test;
+
import java.util.concurrent.ExecutorService;
public class AppSearchSessionLocalCtsTest extends AppSearchSessionCtsTestBase {
@@ -43,4 +46,12 @@
new LocalStorage.SearchContext.Builder(context).setDatabaseName(dbName).build(),
executor);
}
+
+ @FlakyTest(bugId = 187831733)
+ @Test
+ @Override
+ public void testCloseAndReopen() throws Exception {
+ super.testCloseAndReopen();
+ }
+
}
diff --git a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/selection/TextSelectionColorsScreenshotTest.kt b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/selection/TextSelectionColorsScreenshotTest.kt
index f067ec3..111e669 100644
--- a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/selection/TextSelectionColorsScreenshotTest.kt
+++ b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/selection/TextSelectionColorsScreenshotTest.kt
@@ -111,6 +111,7 @@
.assertAgainstGolden(screenshotRule, "text_customSelectionColors")
}
+ @FlakyTest(bugId = 179770443)
@Test
fun textField_defaultSelectionColors() {
rule.setContent {
diff --git a/room/runtime/build.gradle b/room/runtime/build.gradle
index 6985986..1740d3c 100644
--- a/room/runtime/build.gradle
+++ b/room/runtime/build.gradle
@@ -51,6 +51,7 @@
testImplementation("androidx.lifecycle:lifecycle-livedata-core:2.0.0")
testImplementation(KOTLIN_STDLIB)
testImplementation(TRUTH)
+ testImplementation(ANDROIDX_TEST_RUNNER) // Needed for @FlakyTest and @Ignore
androidTestImplementation(JUNIT)
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
diff --git a/room/runtime/src/test/java/androidx/room/TransactionExecutorTest.kt b/room/runtime/src/test/java/androidx/room/TransactionExecutorTest.kt
index edda059..3935b52 100644
--- a/room/runtime/src/test/java/androidx/room/TransactionExecutorTest.kt
+++ b/room/runtime/src/test/java/androidx/room/TransactionExecutorTest.kt
@@ -16,6 +16,7 @@
package androidx.room
+import androidx.test.filters.FlakyTest
import com.google.common.truth.Truth.assertThat
import org.junit.After
import org.junit.Test
@@ -36,6 +37,7 @@
testExecutor.shutdownNow()
}
+ @FlakyTest(bugId = 187828770)
@Test
@Throws(InterruptedException::class)
fun testSerialExecution() {
diff --git a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/SwipeTest.kt b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/SwipeTest.kt
index d1d21f9..d669298 100644
--- a/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/SwipeTest.kt
+++ b/viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/SwipeTest.kt
@@ -16,6 +16,7 @@
package androidx.viewpager2.widget
+import androidx.test.filters.FlakyTest
import androidx.test.filters.LargeTest
import androidx.viewpager2.widget.SwipeTest.TestConfig
import androidx.viewpager2.widget.ViewPager2.ORIENTATION_HORIZONTAL
@@ -34,6 +35,7 @@
@RunWith(Parameterized::class)
@LargeTest
+@FlakyTest(bugId = 187830562)
class SwipeTest(private val testConfig: TestConfig) : BaseTest() {
@Test
fun test() {