OSDN Git Service

IpManagerTest: fix flaky test for real
authorHugo Benichi <hugobenichi@google.com>
Fri, 21 Jul 2017 05:12:26 +0000 (14:12 +0900)
committerHugo Benichi <hugobenichi@google.com>
Fri, 21 Jul 2017 05:14:25 +0000 (14:14 +0900)
commite9bdc19a43c46e8d2116017a1f58d88cb87d13f5
treeedbd9d4784806c2da9499958b016db34e124c1fd
parent2627d4856be08bda40f6b50ba0974f8b875f4995
IpManagerTest: fix flaky test for real

Commit c10fe5f46367 tried to fix the flaky unit test for a default
ProvisioningConfiguration but failed to reinitialize the mock class
involved, so that in practice the flaky assertion is as flaky as before.

This patch correctly resets the mock after the default assertions are
done once an IpManager object is created.

Bug: 32561414
Bug: 62918393
Test: runtest frameworks-net
Change-Id: I516b6981f96e83a90cb372a727c41f0b2ea59801
tests/net/java/android/net/ip/IpManagerTest.java