Speed up IpClientIntegrationTest.
1. Ensure the IpMemoryStore always immediately answers questions from the DHCP client. Otherwise, starting the DHCP client takes two seconds as the query to the IpMemoryStore times out. This does not affect tests that use the IpMemoryStore because unlike when(), doAnswer() can be called multiple times. 2. Disable IPv6 provisioning delays before every test, instead of requiring every test to do it individually. 3. Disable DAD as well as setting router solicitation delay to 0. This results in the IP stack essentially immediately after IpClient is told to start. This speeds up the test by about 2x. Before: $ time atest -ti NetworkStackIntegrationTests:IpClientIntegrationTest ... real 1m21.375s After: $ time atest -ti NetworkStackIntegrationTests:IpClientIntegrationTest ... real 0m41.642s Bug: 152723363 Test: test-only change Change-Id: I32f24ed03fde6fe7e0d0531fa2a289b7f4f88745
Loading
Please register or sign in to comment