Enable the IgnoreClassLevelDetector lint check for test files
This should have been included in the original Cl (aosp/2105185)
Test: Creating the error in a test file and checking that the lint catches it
Bug: 233355288
Change-Id: I911073660c5f760f4b1fbc4fa710a163b1d6ddd8
diff --git a/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/GithubBrowserBaselineProfile.kt b/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/GithubBrowserBaselineProfile.kt
index 4983e76..0ba4e48 100644
--- a/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/GithubBrowserBaselineProfile.kt
+++ b/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/GithubBrowserBaselineProfile.kt
@@ -33,7 +33,6 @@
@LargeTest
@SdkSuppress(minSdkVersion = 29)
@OptIn(ExperimentalBaselineProfilesApi::class)
-@Ignore
class GithubBrowserBaselineProfile {
/**
@@ -60,6 +59,7 @@
}
@Test
+ @Ignore
fun githubBrowserProfiles() {
baselineRule.collectBaselineProfile(
packageName = PACKAGE_NAME,
diff --git a/buildSrc/lint.xml b/buildSrc/lint.xml
index 693786b..72bcf5b 100644
--- a/buildSrc/lint.xml
+++ b/buildSrc/lint.xml
@@ -38,4 +38,5 @@
<issue id="NewApi" severity="fatal" />
<issue id="WrongThread" severity="fatal" />
<issue id="MissingTestSizeAnnotation" severity="fatal" />
+ <issue id="IgnoreClassLevelDetector" severity="fatal" />
</lint>
diff --git a/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/impl/CapturePipelineTest.kt b/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/impl/CapturePipelineTest.kt
index 46cebd0..2b64455 100644
--- a/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/impl/CapturePipelineTest.kt
+++ b/camera/camera-camera2-pipe-integration/src/test/java/androidx/camera/camera2/pipe/integration/impl/CapturePipelineTest.kt
@@ -69,7 +69,6 @@
import java.util.concurrent.Semaphore
import java.util.concurrent.TimeUnit
-@Ignore // b/216788724
@RunWith(RobolectricCameraPipeTestRunner::class)
@DoNotInstrument
@Config(minSdk = Build.VERSION_CODES.LOLLIPOP)
@@ -210,11 +209,13 @@
}
@Test
+ @Ignore // b/216788724
fun miniLatency_flashOn_shouldTriggerAePreCapture(): Unit = runBlocking {
flashOn_shouldTriggerAePreCapture(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY)
}
@Test
+ @Ignore // b/216788724
fun maxQuality_flashOn_shouldTriggerAePreCapture(): Unit = runBlocking {
flashOn_shouldTriggerAePreCapture(ImageCapture.CAPTURE_MODE_MAXIMIZE_QUALITY)
}
@@ -250,11 +251,13 @@
}
@Test
+ @Ignore // b/216788724
fun miniLatency_flashAutoFlashRequired_shouldTriggerAePreCapture(): Unit = runBlocking {
flashAutoFlashRequired_shouldTriggerAePreCapture(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY)
}
@Test
+ @Ignore // b/216788724
fun maxQuality_flashAutoFlashRequired_shouldTriggerAePreCapture(): Unit = runBlocking {
flashAutoFlashRequired_shouldTriggerAePreCapture(ImageCapture.CAPTURE_MODE_MAXIMIZE_QUALITY)
}
@@ -302,11 +305,13 @@
// maxQuality_withTorchAsFlashQuirk_shouldOpenTorch
@Test
+ @Ignore // b/216788724
fun miniLatency_withTemplateRecord_shouldOpenTorch(): Unit = runBlocking {
withTemplateRecord_shouldOpenTorch(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY)
}
@Test
+ @Ignore // b/216788724
fun maxQuality_withTemplateRecord_shouldOpenTorch(): Unit = runBlocking {
withTemplateRecord_shouldOpenTorch(ImageCapture.CAPTURE_MODE_MAXIMIZE_QUALITY)
}
@@ -348,11 +353,13 @@
}
@Test
+ @Ignore // b/216788724
fun miniLatency_withFlashTypeTorch_shouldOpenTorch(): Unit = runBlocking {
withFlashTypeTorch_shouldOpenTorch(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY)
}
@Test
+ @Ignore // b/216788724
fun maxQuality_withFlashTypeTorch_shouldOpenTorch(): Unit = runBlocking {
withFlashTypeTorch_shouldOpenTorch(ImageCapture.CAPTURE_MODE_MAXIMIZE_QUALITY)
}
@@ -392,6 +399,7 @@
}
@Test
+ @Ignore // b/216788724
fun miniLatency_flashRequired_withFlashTypeTorch_shouldLock3A(): Unit = runBlocking {
withFlashTypeTorch_shouldLock3A(
ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY,
@@ -400,6 +408,7 @@
}
@Test
+ @Ignore // b/216788724
fun maxQuality_withFlashTypeTorch_shouldLock3A(): Unit = runBlocking {
withFlashTypeTorch_shouldLock3A(
ImageCapture.CAPTURE_MODE_MAXIMIZE_QUALITY,
@@ -441,6 +450,7 @@
}
@Test
+ @Ignore // b/216788724
fun miniLatency_withFlashTypeTorch_shouldNotLock3A(): Unit = runBlocking {
// Act.
capturePipeline.submitStillCaptures(
@@ -457,6 +467,7 @@
}
@Test
+ @Ignore // b/216788724
fun withFlashTypeTorch_torchAlreadyOn_skipTurnOnTorch(): Unit = runBlocking {
// Arrange.
// Ensure the torch is already turned on before capturing.
@@ -480,6 +491,7 @@
}
@Test
+ @Ignore // b/216788724
fun miniLatency_shouldNotAePreCapture(): Unit = runBlocking {
// Act.
capturePipeline.submitStillCaptures(
@@ -496,6 +508,7 @@
}
@Test
+ @Ignore // b/216788724
fun captureFailure_taskShouldFailure(): Unit = runBlocking {
// Arrange.
fakeCameraGraphSession.requestHandler = { requests ->
@@ -532,6 +545,7 @@
}
@Test
+ @Ignore // b/216788724
fun captureCancel_taskShouldFailureWithCAMERA_CLOSED(): Unit = runBlocking {
// Arrange.
fakeCameraGraphSession.requestHandler = { requests ->
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ComposeCallLoweringTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ComposeCallLoweringTests.kt
index e573c91..d1ad863 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ComposeCallLoweringTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ComposeCallLoweringTests.kt
@@ -35,10 +35,10 @@
minSdk = 23,
maxSdk = 23
)
-@Ignore("b/173733968")
class ComposeCallLoweringTests : AbstractLoweringTests() {
@Test
+ @Ignore("b/173733968")
fun testInlineGroups(): Unit = ensureSetup {
compose(
"""
@@ -62,6 +62,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testReturnInsideKey(): Unit = ensureSetup {
compose(
"""
@@ -82,6 +83,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testMoveFromIssue(): Unit = ensureSetup {
compose(
"""
@@ -94,6 +96,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testSimpleInlining(): Unit = ensureSetup {
compose(
"""
@@ -112,6 +115,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testVarargCall(): Unit = ensureSetup {
compose(
"""
@@ -141,6 +145,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testVarargs(): Unit = ensureSetup {
codegen(
"""
@@ -162,6 +167,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testComposableLambdaCall(): Unit = ensureSetup {
codegen(
"""
@@ -176,6 +182,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testProperties(): Unit = ensureSetup {
codegen(
"""
@@ -205,6 +212,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testUnboundSymbolIssue(): Unit = ensureSetup {
codegenNoImports(
"""
@@ -259,6 +267,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testPropertyValues(): Unit = ensureSetup {
compose(
"""
@@ -291,6 +300,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testComposableLambdaCallWithGenerics(): Unit = ensureSetup {
codegen(
"""
@@ -321,6 +331,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testMethodInvocations(): Unit = ensureSetup {
codegen(
"""
@@ -339,6 +350,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testReceiverLambdaInvocation(): Unit = ensureSetup {
codegen(
"""
@@ -352,6 +364,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testReceiverLambda2(): Unit = ensureSetup {
codegen(
"""
@@ -373,6 +386,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testInlineChildren(): Unit = ensureSetup {
codegen(
"""
@@ -392,6 +406,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testNoComposerImport(): Unit = ensureSetup {
codegenNoImports(
"""
@@ -416,6 +431,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testInlineNoinline(): Unit = ensureSetup {
codegen(
"""
@@ -439,6 +455,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testInlinedComposable(): Unit = ensureSetup {
codegen(
"""
@@ -458,6 +475,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testGenericParameterOrderIssue(): Unit = ensureSetup {
codegen(
"""
@@ -476,6 +494,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testArgumentOrderIssue(): Unit = ensureSetup {
codegen(
"""
@@ -498,6 +517,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testObjectName(): Unit = ensureSetup {
codegen(
"""
@@ -515,6 +535,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testStuffThatIWantTo(): Unit = ensureSetup {
codegen(
"""
@@ -533,6 +554,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testSimpleFunctionResolution(): Unit = ensureSetup {
compose(
"""
@@ -552,6 +574,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testSimpleClassResolution(): Unit = ensureSetup {
compose(
"""
@@ -568,6 +591,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testSetContent(): Unit = ensureSetup {
codegen(
"""
@@ -585,6 +609,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testComposeWithResult(): Unit = ensureSetup {
compose(
"""
@@ -604,6 +629,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testObservable(): Unit = ensureSetup {
compose(
"""
@@ -632,6 +658,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testObservableLambda(): Unit = ensureSetup {
compose(
"""
@@ -664,6 +691,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testObservableGenericFunction(): Unit = ensureSetup {
compose(
"""
@@ -689,6 +717,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testObservableExtension(): Unit = ensureSetup {
compose(
"""
@@ -716,6 +745,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testObserverableExpressionBody(): Unit = ensureSetup {
compose(
"""
@@ -745,6 +775,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testObservableInlineWrapper(): Unit = ensureSetup {
compose(
"""
@@ -784,6 +815,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testObservableDefaultParameter(): Unit = ensureSetup {
compose(
"""
@@ -811,6 +843,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testObservableEarlyReturn(): Unit = ensureSetup {
compose(
"""
@@ -850,6 +883,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGSimpleTextView(): Unit = ensureSetup {
compose(
"""
@@ -865,6 +899,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGLocallyScopedFunction(): Unit = ensureSetup {
compose(
"""
@@ -886,6 +921,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGLocallyScopedExtensionFunction(): Unit = ensureSetup {
compose(
"""
@@ -907,6 +943,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testImplicitReceiverScopeCall(): Unit = ensureSetup {
compose(
"""
@@ -935,6 +972,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGLocallyScopedInvokeOperator(): Unit = ensureSetup {
compose(
"""
@@ -957,6 +995,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testTrivialExtensionFunction(): Unit = ensureSetup {
compose(
""" """,
@@ -969,6 +1008,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testTrivialInvokeExtensionFunction(): Unit = ensureSetup {
compose(
""" """,
@@ -981,6 +1021,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGNSimpleTextView(): Unit = ensureSetup {
compose(
"""
@@ -996,6 +1037,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testInliningTemp2(): Unit = ensureSetup {
compose(
"""
@@ -1012,6 +1054,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testInliningTemp3(): Unit = ensureSetup {
compose(
"""
@@ -1028,6 +1071,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testInliningTemp4(): Unit = ensureSetup {
compose(
"""
@@ -1044,6 +1088,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testInline_NonComposable_Identity(): Unit = ensureSetup {
compose(
"""
@@ -1062,6 +1107,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testInline_Composable_Identity(): Unit = ensureSetup {
compose(
"""
@@ -1075,6 +1121,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testInline_Composable_EmitChildren(): Unit = ensureSetup {
compose(
"""
@@ -1100,6 +1147,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGNInlining(): Unit = ensureSetup {
compose(
"""
@@ -1117,6 +1165,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testInlineClassesAsComposableParameters(): Unit = ensureSetup {
codegen(
"""
@@ -1134,6 +1183,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testInlineClassesAsDefaultParameters(): Unit = ensureSetup {
compose(
"""
@@ -1153,6 +1203,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testRangeForLoop(): Unit = ensureSetup {
codegen(
"""
@@ -1168,6 +1219,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testReturnValue(): Unit = ensureSetup {
compose(
"""
@@ -1234,6 +1286,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testReorderedArgsReturnValue(): Unit = ensureSetup {
compose(
"""
@@ -1255,6 +1308,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testTrivialReturnValue(): Unit = ensureSetup {
compose(
"""
@@ -1279,6 +1333,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testForDevelopment(): Unit = ensureSetup {
codegen(
"""
@@ -1298,6 +1353,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testInliningTemp(): Unit = ensureSetup {
compose(
"""
@@ -1319,6 +1375,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGUpdatedComposition(): Unit = ensureSetup {
var value = "Hello, world!"
@@ -1340,6 +1397,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGNUpdatedComposition(): Unit = ensureSetup {
var value = "Hello, world!"
@@ -1361,6 +1419,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGViewGroup(): Unit = ensureSetup {
val tvId = 258
val llId = 260
@@ -1394,6 +1453,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGNFunctionComponent(): Unit = ensureSetup {
var text = "Hello, world!"
val tvId = 123
@@ -1423,6 +1483,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCompositionLocalConsumedFromDefaultParameter(): Unit = ensureSetup {
val initialText = "no text"
val helloWorld = "Hello World!"
@@ -1466,6 +1527,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGNViewGroup(): Unit = ensureSetup {
val tvId = 258
val llId = 260
@@ -1499,6 +1561,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testMemoization(): Unit = ensureSetup {
val tvId = 258
val tagId = (3 shl 24) or "composed_set".hashCode()
@@ -1578,6 +1641,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testInlineClassMemoization(): Unit = ensureSetup {
val tvId = 258
val tagId = (3 shl 24) or "composed_set".hashCode()
@@ -1664,6 +1728,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testStringParameterMemoization(): Unit = ensureSetup {
val tvId = 258
val tagId = (3 shl 24) or "composed_set".hashCode()
@@ -1711,6 +1776,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGNSimpleCall(): Unit = ensureSetup {
val tvId = 258
var text = "Hello, world!"
@@ -1739,6 +1805,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGNCallWithChildren(): Unit = ensureSetup {
val tvId = 258
var text = "Hello, world!"
@@ -1772,6 +1839,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGComposableFunctionInvocationOneParameter(): Unit = ensureSetup {
val tvId = 91
var phone = "(123) 456-7890"
@@ -1798,6 +1866,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCGComposableFunctionInvocationTwoParameters(): Unit = ensureSetup {
val tvId = 111
val rsId = 112
@@ -1857,6 +1926,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testImplicitReceiverPassing1(): Unit = ensureSetup {
compose(
"""
@@ -1879,6 +1949,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testImplicitReceiverPassing2(): Unit = ensureSetup {
compose(
"""
@@ -1905,6 +1976,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testEffects1(): Unit = ensureSetup {
compose(
"""
@@ -1935,6 +2007,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testEffects2(): Unit = ensureSetup {
compose(
"""
@@ -2051,6 +2124,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testVariableCalls1(): Unit = ensureSetup {
compose(
"""
@@ -2069,6 +2143,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testVariableCalls2(): Unit = ensureSetup {
compose(
"""
@@ -2091,6 +2166,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testVariableCalls3(): Unit = ensureSetup {
compose(
"""
@@ -2119,6 +2195,7 @@
// b/123721921
@Test
+ @Ignore("b/173733968")
fun testDefaultParameters1(): Unit = ensureSetup {
compose(
"""
@@ -2138,6 +2215,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testDefaultParameters2(): Unit = ensureSetup {
compose(
"""
@@ -2158,6 +2236,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testMovement(): Unit = ensureSetup {
val tvId = 50
val btnIdAdd = 100
@@ -2244,6 +2323,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testObserveKtxWithInline(): Unit = ensureSetup {
compose(
"""
@@ -2281,6 +2361,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testKeyTag(): Unit = ensureSetup {
compose(
"""
@@ -2330,6 +2411,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testNonComposeParameters(): Unit = ensureSetup {
compose(
"""
@@ -2511,6 +2593,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testStableParameters_Lambdas(): Unit = ensureSetup {
val output = ArrayList<String>()
compose(
@@ -2591,6 +2674,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testRecomposeScope(): Unit = ensureSetup {
compose(
"""
@@ -2643,6 +2727,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testRecomposeScope_ReceiverScope(): Unit = ensureSetup {
compose(
"""
@@ -2677,6 +2762,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testCompose_InlineReceiver(): Unit = ensureSetup {
compose(
"""
@@ -2698,6 +2784,7 @@
}
@Test
+ @Ignore("b/173733968")
fun testRecomposeScope_Method(): Unit = ensureSetup {
compose(
"""
diff --git a/lint-checks/src/test/java/androidx/build/lint/ObsoleteBuildCompatUsageDetectorTest.kt b/lint-checks/src/test/java/androidx/build/lint/ObsoleteBuildCompatUsageDetectorTest.kt
index 874cc32..7834027 100644
--- a/lint-checks/src/test/java/androidx/build/lint/ObsoleteBuildCompatUsageDetectorTest.kt
+++ b/lint-checks/src/test/java/androidx/build/lint/ObsoleteBuildCompatUsageDetectorTest.kt
@@ -23,7 +23,6 @@
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-@Ignore("ANDROID_HOME not available on CI")
@RunWith(JUnit4::class)
class ObsoleteBuildCompatUsageDetectorTest : AbstractLintDetectorTest(
useDetector = ObsoleteBuildCompatUsageDetector(),
@@ -32,6 +31,7 @@
) {
@Test
+ @Ignore("ANDROID_HOME not available on CI")
fun isAtLeastN() {
val input = java(
"""
@@ -69,6 +69,7 @@
}
@Test
+ @Ignore("ANDROID_HOME not available on CI")
fun isAtLeastNStaticImport() {
val input = java(
"""
@@ -106,6 +107,7 @@
}
@Test
+ @Ignore("ANDROID_HOME not available on CI")
fun isAtLeastNMR1() {
val input = java(
"""
@@ -143,6 +145,7 @@
}
@Test
+ @Ignore("ANDROID_HOME not available on CI")
fun isAtLeastO() {
val input = java(
"""
@@ -180,6 +183,7 @@
}
@Test
+ @Ignore("ANDROID_HOME not available on CI")
fun isAtLeastOMR1() {
val input = java(
"""
@@ -217,6 +221,7 @@
}
@Test
+ @Ignore("ANDROID_HOME not available on CI")
fun isAtLeastP() {
val input = java(
"""
@@ -254,6 +259,7 @@
}
@Test
+ @Ignore("ANDROID_HOME not available on CI")
fun isAtLeastQ() {
val input = java(
"""
diff --git a/room/room-runtime/src/test/java/androidx/room/InvalidationTrackerTest.java b/room/room-runtime/src/test/java/androidx/room/InvalidationTrackerTest.java
index 0805fac..2729620 100644
--- a/room/room-runtime/src/test/java/androidx/room/InvalidationTrackerTest.java
+++ b/room/room-runtime/src/test/java/androidx/room/InvalidationTrackerTest.java
@@ -48,6 +48,7 @@
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -76,7 +77,6 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.ReentrantLock;
[email protected] // TODO(b/233855234) - disabled until test is moved to Kotlin
@RunWith(JUnit4.class)
public class InvalidationTrackerTest {
private InvalidationTracker mTracker;
@@ -126,6 +126,7 @@
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void tableIds() {
assertThat(mTracker.tableIdLookup.size(), is(5));
assertThat(mTracker.tableIdLookup.get("a"), is(0));
@@ -136,6 +137,7 @@
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void tableNames() {
assertThat(mTracker.tablesNames.length, is(5));
assertThat(mTracker.tablesNames[0], is("a"));
@@ -146,6 +148,7 @@
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void testWeak() throws InterruptedException {
final AtomicInteger data = new AtomicInteger(0);
InvalidationTracker.Observer observer = new InvalidationTracker.Observer("a") {
@@ -168,6 +171,7 @@
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void addRemoveObserver() throws Exception {
InvalidationTracker.Observer observer = new LatchObserver(1, "a");
mTracker.addObserver(observer);
@@ -183,6 +187,7 @@
}
@Test(expected = IllegalArgumentException.class)
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void badObserver() {
InvalidationTracker.Observer observer = new LatchObserver(1, "x");
mTracker.addObserver(observer);
@@ -194,6 +199,7 @@
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void refreshCheckTasks() throws Exception {
when(mRoomDatabase.query(any(SimpleSQLiteQuery.class)))
.thenReturn(mock(Cursor.class));
@@ -208,6 +214,7 @@
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void observe1Table() throws Exception {
LatchObserver observer = new LatchObserver(1, "a");
mTracker.addObserver(observer);
@@ -230,6 +237,7 @@
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void observe2Tables() throws Exception {
LatchObserver observer = new LatchObserver(1, "A", "B");
mTracker.addObserver(observer);
@@ -259,12 +267,14 @@
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void locale() {
LatchObserver observer = new LatchObserver(1, "I");
mTracker.addObserver(observer);
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void closedDb() {
doReturn(false).when(mRoomDatabase).isOpen();
doThrow(new IllegalStateException("foo")).when(mOpenHelper).getWritableDatabase();
@@ -273,6 +283,7 @@
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void createTriggerOnShadowTable() {
LatchObserver observer = new LatchObserver(1, "C");
String[] triggers = new String[]{"UPDATE", "DELETE", "INSERT"};
@@ -309,6 +320,7 @@
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void observeFtsTable() throws InterruptedException {
LatchObserver observer = new LatchObserver(1, "C");
mTracker.addObserver(observer);
@@ -331,6 +343,7 @@
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void observeExternalContentFtsTable() throws InterruptedException {
LatchObserver observer = new LatchObserver(1, "d");
mTracker.addObserver(observer);
@@ -353,6 +366,7 @@
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void observeExternalContentFtsTableAndContentTable() throws InterruptedException {
LatchObserver observer = new LatchObserver(1, "d", "a");
mTracker.addObserver(observer);
@@ -375,6 +389,7 @@
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void observeExternalContentFatsTableAndContentTableSeparately()
throws InterruptedException {
LatchObserver observerA = new LatchObserver(1, "a");
@@ -407,6 +422,7 @@
}
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void observeView() throws InterruptedException {
LatchObserver observer = new LatchObserver(1, "E");
mTracker.addObserver(observer);
@@ -430,6 +446,7 @@
@SuppressWarnings("deprecation")
@Test
+ @Ignore // TODO(b/233855234) - disabled until test is moved to Kotlin
public void failFastCreateLiveData() {
// assert that sending a bad createLiveData table name fails instantly
try {
@@ -445,7 +462,8 @@
}
}
- // @Test - disabled due to flakiness b/65257997
+ @Test
+ @Ignore // disabled due to flakiness b/65257997
public void closedDbAfterOpen() throws InterruptedException {
setInvalidatedTables(3, 1);
mTracker.addObserver(new LatchObserver(1, "a", "b"));