summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lucas Lin <lucaslin@google.com> 2020-11-30 06:28:45 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-11-30 06:28:45 +0000
commit3c562532296761001402db0d472a3cef07cacfc3 (patch)
treed02beddc13f580ba77aedb485fae907bccc96683
parent2ebb54e77fb8fd8d30013db4b53b5b4518c6ffad (diff)
parentd0c92ed5fed3db34b209ef25241bb0d1e6772387 (diff)
Merge "Ignore verifying canBeSatisfiedBy() on Android Q" into mainline-prod
-rw-r--r--tests/net/common/java/android/net/MatchAllNetworkSpecifierTest.kt9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/net/common/java/android/net/MatchAllNetworkSpecifierTest.kt b/tests/net/common/java/android/net/MatchAllNetworkSpecifierTest.kt
index a67156a74d18..a5e44d59fcab 100644
--- a/tests/net/common/java/android/net/MatchAllNetworkSpecifierTest.kt
+++ b/tests/net/common/java/android/net/MatchAllNetworkSpecifierTest.kt
@@ -53,8 +53,13 @@ class MatchAllNetworkSpecifierTest {
assertParcelSane(MatchAllNetworkSpecifier(), 0)
}
- @Test @IgnoreAfter(Build.VERSION_CODES.R)
- fun testCanBeSatisfiedBy_BeforeS() {
+ @Test
+ @IgnoreUpTo(Build.VERSION_CODES.Q)
+ @IgnoreAfter(Build.VERSION_CODES.R)
+ // Only run this test on Android R.
+ // The method - satisfiedBy() has changed to canBeSatisfiedBy() starting from Android R, so the
+ // method - canBeSatisfiedBy() cannot be found when running this test on Android Q.
+ fun testCanBeSatisfiedBy_OnlyForR() {
// MatchAllNetworkSpecifier didn't follow its parent class to change the satisfiedBy() to
// canBeSatisfiedBy(), so if a caller calls MatchAllNetworkSpecifier#canBeSatisfiedBy(), the
// NetworkSpecifier#canBeSatisfiedBy() will be called actually, and false will be returned.