diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2020-04-24 16:41:38 +0000 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2020-04-25 03:32:54 +0000 |
commit | 5ce2db965e93f3931337049f258cc5509b1300ea (patch) | |
tree | 43fcb47a1c4d7fbe7cd9d112b306aac41b325976 | |
parent | 0c36412a414dc1afb11c08dc634e8516662765b8 (diff) |
Skip tests if the shims are too old for them to pass.
Two tests in IpClientIntegrationTest depend on methods that
require R. These tests are already ignored on Q devices. However,
when running NetworkStackIntegrationTests (as opposed to
NetworkStackNextIntegrationtests), the tests fail because they
compile against the Q shims, and the code behaves the same way as
it does on Q.
Skip these tests by checking the version of the shims.
Bug: 152723363
Test: atest NetworkStackIntegrationTests has two fewer failures
Merged-In: I388bd58e79cd4310ad286bcc5688e96b16787be0
Change-Id: I388bd58e79cd4310ad286bcc5688e96b16787be0
-rw-r--r-- | tests/integration/src/android/net/ip/IpClientIntegrationTest.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/integration/src/android/net/ip/IpClientIntegrationTest.java b/tests/integration/src/android/net/ip/IpClientIntegrationTest.java index aed85d5..a89f07d 100644 --- a/tests/integration/src/android/net/ip/IpClientIntegrationTest.java +++ b/tests/integration/src/android/net/ip/IpClientIntegrationTest.java @@ -132,6 +132,7 @@ import androidx.test.runner.AndroidJUnit4; import com.android.internal.util.StateMachine; import com.android.networkstack.apishim.CaptivePortalDataShimImpl; +import com.android.networkstack.apishim.ConstantsShim; import com.android.networkstack.apishim.ShimUtils; import com.android.networkstack.arp.ArpPacket; import com.android.server.NetworkObserverRegistry; @@ -1112,6 +1113,8 @@ public class IpClientIntegrationTest { @Test @IgnoreUpTo(Build.VERSION_CODES.Q) public void testDhcpServerInLinkProperties() throws Exception { + assumeTrue(ConstantsShim.VERSION > Build.VERSION_CODES.Q); + performDhcpHandshake(); ArgumentCaptor<LinkProperties> captor = ArgumentCaptor.forClass(LinkProperties.class); verify(mCb, timeout(TEST_TIMEOUT_MS)).onProvisioningSuccess(captor.capture()); @@ -1385,6 +1388,8 @@ public class IpClientIntegrationTest { @Test @IgnoreUpTo(Build.VERSION_CODES.Q) public void testPref64Option() throws Exception { + assumeTrue(ConstantsShim.VERSION > Build.VERSION_CODES.Q); + disableRouterSolicitationDelay(); ProvisioningConfiguration config = new ProvisioningConfiguration.Builder() |