commit | 49ef6db74661d7cd93425bf7dc7253f0af917f22 | [log] [tgz] |
---|---|---|
author | Chiachang Wang <chiachangwang@google.com> | Tue Oct 03 07:29:37 2023 +0000 |
committer | Chiachang Wang <chiachangwang@google.com> | Tue Oct 03 07:54:33 2023 +0000 |
tree | 6625d65169bc1e71b1edfc7f37a9ac0b31c8f8f5 | |
parent | 39d8ae97dcfcba9c76ca6b7754a889c45f09a981 [diff] |
Explicitly set other mocking URLConnections to deflake test The testNotifyNetwork_WithforceReevaluation() interacts with mock fallback probe URL object, but the URLConnection initialization for the mocking object is not applied to the fallback one which may cause test flaky. Also apply to other URLConnection objects. The getHeaderField() method should also be explicitly set. Test: atest NetworkStackTests Fix: 302851847 Change-Id: I4feedf7b46c0cbb4b903b221b2cc540473ea8052