commit | 0cbaa8ddc835d5c78eb39473da96b4267dcee359 | [log] [tgz] |
---|---|---|
author | Chiachang Wang <chiachangwang@google.com> | Tue Jul 21 09:55:58 2020 +0800 |
committer | Chiachang Wang <chiachangwang@google.com> | Tue Jul 28 05:24:29 2020 +0000 |
tree | 742a10c70d44a8ef8b77a95f6b8378f211782b73 | |
parent | 2b0d80469fa72f35a080186692f1a029e80dc885 [diff] |
Update sequence and method of the mock object to prevent flaky Use doReturn family of methods as suggestion in the Mockito doc to prevent certain rare occasions. Also mock the tcp polling interval before creating NetworkMonitor to prevent interacting mock while NetworkMonitor's handler may not be idle. Bug: 161426331 Test: atest NetworkStackNextTests:NetworkMonitorTest \ --rerun-until-failure 100 Change-Id: I420bb197f4f62513b48828181a9907852cdfdc5f