Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bd919747 authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

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
parent 58da4e39
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment