diff options
author | Xiao Ma <xiaom@google.com> | 2020-05-25 09:03:44 +0000 |
---|---|---|
committer | Xiao Ma <xiaom@google.com> | 2020-05-25 13:33:04 +0000 |
commit | 5b129a638db700c2069a85efec84753c88f1af29 (patch) | |
tree | da4bd33ff8bdafc0a2935a9152553e34aff788e8 /tests | |
parent | 7bfc08f95f981e77279cdc30371804db8d801fe1 (diff) |
Enable DHCP INIT-REBOOT state on R.
Bug: 156575243
Test: atest NetworkStackTests NetworkStackIntegrationTests
Test: atest NetworkStackNextIntegrationTests
Test: manual test:
1. connect to AP successfully at the first time
2. disconnect wifi
3. reconnect to the same AP
4. checked client broadcasts REQUEST instead of DISCOVER
5. checked client broadcasts DISCOVER if lease has expired
Merged-In: I62d1ab6b94be1ee95fbaa2ecce62eaba01e7892d
Change-Id: I62d1ab6b94be1ee95fbaa2ecce62eaba01e7892d
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/src/android/net/ip/IpClientIntegrationTest.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/integration/src/android/net/ip/IpClientIntegrationTest.java b/tests/integration/src/android/net/ip/IpClientIntegrationTest.java index b4efcf9..6a98696 100644 --- a/tests/integration/src/android/net/ip/IpClientIntegrationTest.java +++ b/tests/integration/src/android/net/ip/IpClientIntegrationTest.java @@ -141,6 +141,7 @@ import com.android.server.NetworkObserverRegistry; import com.android.server.NetworkStackService.NetworkStackServiceManager; import com.android.server.connectivity.ipmemorystore.IpMemoryStoreService; import com.android.testutils.DevSdkIgnoreRule; +import com.android.testutils.DevSdkIgnoreRule.IgnoreAfter; import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo; import com.android.testutils.HandlerUtilsKt; import com.android.testutils.TapPacketReader; @@ -319,7 +320,8 @@ public class IpClientIntegrationTest { NetworkStackIpMemoryStore ipMemoryStore) { return new DhcpClient.Dependencies(ipMemoryStore) { @Override - public boolean isFeatureEnabled(final Context context, final String name) { + public boolean isFeatureEnabled(final Context context, final String name, + final boolean defaultEnabled) { switch (name) { case NetworkStackUtils.DHCP_RAPID_COMMIT_VERSION: return mIsDhcpRapidCommitEnabled; @@ -1066,7 +1068,7 @@ public class IpClientIntegrationTest { assertIpMemoryStoreNetworkAttributes(null, currentTime, TEST_DEFAULT_MTU); } - @Test + @Test @IgnoreAfter(Build.VERSION_CODES.Q) // INIT-REBOOT is enabled on R. public void testHandleDisableInitRebootState() throws Exception { performDhcpHandshake(true /* isSuccessLease */, TEST_LEASE_DURATION_S, false /* isDhcpLeaseCacheEnabled */, false /* shouldReplyRapidCommitAck */, |