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
Merged-In: I913b6eaa61bfd4f1964b324dcb4dd272aa8cc583
(cherry picked from commit 4d166d7bd95d9582335aafaa03fb242206449054)
Change-Id: I2ddeee53d4ef63f01b791e3e95161194e29d3978
This commit is contained in:
committed by
Remi NGUYEN VAN
parent
e34d090bce
commit
d7e80c1f34
@@ -18,19 +18,26 @@ package android.net;
|
|||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
|
import android.os.Build;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
|
|
||||||
import androidx.test.filters.SmallTest;
|
import androidx.test.filters.SmallTest;
|
||||||
import androidx.test.runner.AndroidJUnit4;
|
import androidx.test.runner.AndroidJUnit4;
|
||||||
|
|
||||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
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.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@RunWith(AndroidJUnit4.class)
|
@RunWith(AndroidJUnit4.class)
|
||||||
@SmallTest
|
@SmallTest
|
||||||
public class CaptivePortalTest {
|
public class CaptivePortalTest {
|
||||||
|
@Rule
|
||||||
|
public final DevSdkIgnoreRule ignoreRule = new DevSdkIgnoreRule();
|
||||||
|
|
||||||
private static final int DEFAULT_TIMEOUT_MS = 5000;
|
private static final int DEFAULT_TIMEOUT_MS = 5000;
|
||||||
private static final String TEST_PACKAGE_NAME = "com.google.android.test";
|
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);
|
assertEquals(result.mCode, CaptivePortal.APP_RETURN_WANTED_AS_IS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@IgnoreUpTo(Build.VERSION_CODES.Q)
|
||||||
@Test
|
@Test
|
||||||
public void testReevaluateNetwork() {
|
public void testReevaluateNetwork() {
|
||||||
final MyCaptivePortalImpl result = runCaptivePortalTest(c -> c.reevaluateNetwork());
|
final MyCaptivePortalImpl result = runCaptivePortalTest(c -> c.reevaluateNetwork());
|
||||||
|
|||||||
Reference in New Issue
Block a user