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

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

Make it possible to shut down and recreate IpClient in a test.

This is not currently possible because waitForRouterSolicitation
only actually waits for an RS the first time it runs.  This is
because it returns immediately, without waiting, if a RS was
received at any time since the test started. This was done
because dual-stack provisioning tests were flaky, because
getNextDhcpPacket would sometimes consume the RS.

Fix this by making getNextDhcpPacket and getNextArpPacket use
ReadHeads on the TapPacketReader, and going back to using poll in
waitForRouterSolicitation.

Given that waitForRouterSolicitation was the only user of
TapPacketReader#getReceivedPackets, replace that method with a
newReadHead function which seems easier to use.

Bug: 161330494
Test: atest NetworkStackNextIntegrationTests:IpClientIntegrationTest
Change-Id: I7f3ea4f21b80958f5704375ee7a0b17b25720d9d
parent 9e6aeea3
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