summaryrefslogtreecommitdiff
path: root/ravenwood/junit-src
diff options
context:
space:
mode:
author John Wu <topjohnwu@google.com> 2025-03-10 15:21:40 -0700
committer John Wu <topjohnwu@google.com> 2025-03-10 15:21:40 -0700
commit2fa4952bd5675689b3723ad9cabf446f1cf6c179 (patch)
tree367fdd690aba3e51203804d97498678c976f6941 /ravenwood/junit-src
parent47473c5ed943172686213824a484ecbb81254fb2 (diff)
[Ravenwood] Remove deprecated usage
Bug: 292141694 Flag: EXEMPT host side change only Test: f/b/r/scripts/run-ravenwood-tests.sh Change-Id: I75e4604f8fd391452719bf46d2f345dbb7fada66
Diffstat (limited to 'ravenwood/junit-src')
-rw-r--r--ravenwood/junit-src/android/platform/test/annotations/IgnoreUnderRavenwood.java59
-rw-r--r--ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodClassRule.java35
-rw-r--r--ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java68
3 files changed, 0 insertions, 162 deletions
diff --git a/ravenwood/junit-src/android/platform/test/annotations/IgnoreUnderRavenwood.java b/ravenwood/junit-src/android/platform/test/annotations/IgnoreUnderRavenwood.java
deleted file mode 100644
index 1c06829dba06..000000000000
--- a/ravenwood/junit-src/android/platform/test/annotations/IgnoreUnderRavenwood.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
- package android.platform.test.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Test methods marked with this annotation are quietly ignored when running under a Ravenwood test
- * environment. The test continues to execute normally under all other non-Ravenwood test
- * environments.
- *
- * This annotation only takes effect when the containing class has a {@code
- * RavenwoodRule} configured. Ignoring is accomplished by throwing an {@code org.junit
- * .AssumptionViolatedException} which test infrastructure treats as being ignored.
- *
- * Developers are encouraged to use either the {@code blockedBy} and/or {@code reason} arguments
- * to document why a test is being ignored, to aid in future audits of tests that are candidates
- * to be enabled.
- *
- * @hide
- *
- * @deprecated Use {@link DisabledOnRavenwood} instead.
- */
-@Target({ElementType.METHOD, ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-@Deprecated
-public @interface IgnoreUnderRavenwood {
- /**
- * One or more classes that aren't yet supported by Ravenwood, which this test depends on.
- */
- Class<?>[] blockedBy() default {};
-
- /**
- * General free-form description of why this test is being ignored.
- */
- String reason() default "";
-
- /**
- * Tracking bug number, if any.
- */
- long bug() default 0;
-}
diff --git a/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodClassRule.java b/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodClassRule.java
deleted file mode 100644
index 85297fe96d6a..000000000000
--- a/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodClassRule.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.platform.test.ravenwood;
-
-import org.junit.rules.TestRule;
-import org.junit.runner.Description;
-import org.junit.runners.model.Statement;
-
-/**
- * No longer needed.
- *
- * @deprecated this class used to be used to handle the class level annotation, which
- * is now done by the test runner, so this class is not needed.
- */
-@Deprecated
-public class RavenwoodClassRule implements TestRule {
- @Override
- public Statement apply(Statement base, Description description) {
- return base;
- }
-}
diff --git a/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java b/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java
index ffe5f6c8c579..b0b4c68cf9e0 100644
--- a/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java
+++ b/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java
@@ -100,38 +100,6 @@ public final class RavenwoodRule implements TestRule {
}
/**
- * @deprecated no longer used. We always use an app UID.
- */
- @Deprecated
- public Builder setProcessSystem() {
- return this;
- }
-
- /**
- * @deprecated no longer used. We always use an app UID.
- */
- @Deprecated
- public Builder setProcessApp() {
- return this;
- }
-
- /**
- * @deprecated no longer used.
- */
- @Deprecated
- public Builder setPackageName(@NonNull String packageName) {
- return this;
- }
-
- /**
- * @deprecated no longer used. Main thread is always available.
- */
- @Deprecated
- public Builder setProvideMainThread(boolean provideMainThread) {
- return this;
- }
-
- /**
* Configure the given system property as immutable for the duration of the test.
* Read access to the key is allowed, and write access will fail. When {@code value} is
* {@code null}, the value is left as undefined.
@@ -163,28 +131,12 @@ public final class RavenwoodRule implements TestRule {
return this;
}
- /**
- * @deprecated no longer used. All supported services are available.
- */
- @Deprecated
- public Builder setServicesRequired(@NonNull Class<?>... services) {
- return this;
- }
-
public RavenwoodRule build() {
return mRule;
}
}
/**
- * @deprecated replaced by {@link #isOnRavenwood()}
- */
- @Deprecated
- public static boolean isUnderRavenwood() {
- return IS_ON_RAVENWOOD;
- }
-
- /**
* Return if the current process is running on a Ravenwood test environment.
*/
public static boolean isOnRavenwood() {
@@ -197,26 +149,6 @@ public final class RavenwoodRule implements TestRule {
}
}
- /**
- * @deprecated Use
- * {@code androidx.test.platform.app.InstrumentationRegistry.getInstrumentation().getContext()}
- * instead.
- */
- @Deprecated
- public Context getContext() {
- return InstrumentationRegistry.getInstrumentation().getContext();
- }
-
- /**
- * @deprecated Use
- * {@code androidx.test.platform.app.InstrumentationRegistry.getInstrumentation()}
- * instead.
- */
- @Deprecated
- public Instrumentation getInstrumentation() {
- return InstrumentationRegistry.getInstrumentation();
- }
-
@Override
public Statement apply(Statement base, Description description) {
if (!IS_ON_RAVENWOOD) {