Disable the IPv6 provisioning delay to speed up the integration test. am: 7118826f48 Original change: https://android-review.googlesource.com/c/platform/packages/modules/NetworkStack/+/2548134 Change-Id: I2c4dbc59f5b6243015a2b73e55839601abc1fc6b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/tests/integration/common/android/net/ip/IpClientIntegrationTestCommon.java b/tests/integration/common/android/net/ip/IpClientIntegrationTestCommon.java index 8a4ea1f..2fb5ac8 100644 --- a/tests/integration/common/android/net/ip/IpClientIntegrationTestCommon.java +++ b/tests/integration/common/android/net/ip/IpClientIntegrationTestCommon.java
@@ -729,7 +729,14 @@ final TestNetworkInterface iface = runAsShell(MANAGE_TEST_NETWORKS, () -> { final TestNetworkManager tnm = inst.getContext().getSystemService(TestNetworkManager.class); - return tnm.createTapInterface(); + try { + return tnm.createTapInterface(true /* carrierUp */, true /* bringUp */, + true /* disableIpv6ProvisioningDelay */); + } catch (NoSuchMethodError e) { + // createTapInterface(boolean, boolean, boolean) has been introduced since T, + // use the legancy API if the method is not found on previous platforms. + return tnm.createTapInterface(); + } }); mIfaceName = iface.getInterfaceName(); mClientMac = getIfaceMacAddr(mIfaceName).toByteArray();