From df86d7b41658f89e82a94bdbd66b4866f455792b Mon Sep 17 00:00:00 2001 From: Remi NGUYEN VAN Date: Fri, 6 Mar 2020 17:36:49 +0900 Subject: [PATCH] Ignore testReevaluateNetwork until Q The method did not exist until Q, so the test is not relevant on such devices. Test: atest CtsNetTestCasesLatestSdk:android.net.CaptivePortalTest on Q and R devices Bug: 150918852 Change-Id: I913b6eaa61bfd4f1964b324dcb4dd272aa8cc583 --- tests/net/common/java/android/net/CaptivePortalTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/net/common/java/android/net/CaptivePortalTest.java b/tests/net/common/java/android/net/CaptivePortalTest.java index ca4ba63142..7a60cc105a 100644 --- a/tests/net/common/java/android/net/CaptivePortalTest.java +++ b/tests/net/common/java/android/net/CaptivePortalTest.java @@ -18,19 +18,26 @@ package android.net; import static org.junit.Assert.assertEquals; +import android.os.Build; import android.os.RemoteException; import androidx.test.filters.SmallTest; import androidx.test.runner.AndroidJUnit4; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; +import com.android.testutils.DevSdkIgnoreRule; +import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo; +import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(AndroidJUnit4.class) @SmallTest public class CaptivePortalTest { + @Rule + public final DevSdkIgnoreRule ignoreRule = new DevSdkIgnoreRule(); + private static final int DEFAULT_TIMEOUT_MS = 5000; private static final String TEST_PACKAGE_NAME = "com.google.android.test"; @@ -84,6 +91,7 @@ public class CaptivePortalTest { assertEquals(result.mCode, CaptivePortal.APP_RETURN_WANTED_AS_IS); } + @IgnoreUpTo(Build.VERSION_CODES.Q) @Test public void testReevaluateNetwork() { final MyCaptivePortalImpl result = runCaptivePortalTest(c -> c.reevaluateNetwork());