Networking unit tests: fix some flaky tests

- less strict regex for SharedLogTest: the subsecond part of the
   timestamp can have 0, 1, 2 or 3 digits.
 - refactor NetworkStatsServiceTest and NetworkStatsObserversTest to use
   waitForIdleHandler facility of ConnectivityServiceTest.
   NetworkStatsServiceTest was using a flaky custom version of
   waitForIdleHandler.

Bug: 62918393
Bug: 32561414
Test: runtest frameworks-net
Change-Id: I634acfb5f4fe1bd5267e3f14b9f645edc32d5d12
This commit is contained in:
Hugo Benichi
2017-06-29 22:58:39 +09:00
parent 755c6ea768
commit 44ceaa602e
4 changed files with 24 additions and 85 deletions

View File

@@ -349,7 +349,6 @@ public class NsdManagerTest {
chan.connect(mContext, this, msg.replyTo);
chan.sendMessage(AsyncChannel.CMD_CHANNEL_FULLY_CONNECTED);
}
}
public static MockServiceHandler create(Context context) {