|
|
Chromium Code Reviews
DescriptionAdd a NetworkQualityEstimator to TestURLRequestContext.
This was inspired by a bug in exercised NetworkQualityEstimator NQE codepath,
though this CL would not have caught the issue.
BUG=663456
Committed: https://crrev.com/5ce3e1f8fef0f96ae28a09ac0aba2dc49802f9ee
Cr-Commit-Position: refs/heads/master@{#432277}
Patch Set 1 #Patch Set 2 : Bleh #Patch Set 3 : Fix case the NQE is set before init() #Patch Set 4 : Fix tests #
Total comments: 6
Patch Set 5 : Fix init order #Patch Set 6 : Update comments, fix Android tests #Patch Set 7 : Fix one NQE test #Patch Set 8 : Update comments, fix Android tests #
Messages
Total messages: 53 (37 generated)
The CQ bit was checked by mmenke@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: blimp_linux_dbg on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/blimp_linux_dbg...) cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...) ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...)
The CQ bit was checked by mmenke@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by mmenke@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by mmenke@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Add a NetworkQualityEstimator to TestURLRequestContext. BUG=663456 ========== to ========== Add a NetworkQualityEstimator to TestURLRequestContext. This was inspired by a bug in exercised NetworkQualityEstimator NQE codepath, though this CL would not have caught the issue. BUG=663456 ==========
mmenke@chromium.org changed reviewers: + tbansal@chromium.org
tbansal: Does this seem reasonable? The NQE tests aren't fully setting up the NQE, so I hacked around that in an ugly manner (I could have updated the text expectations, but I don't understand the code well enough to understand if the updated expectations would be correct. Happy to explore that option further).
https://codereview.chromium.org/2484323002/diff/60001/chrome/browser/ssl/chro... File chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc (right): https://codereview.chromium.org/2484323002/diff/60001/chrome/browser/ssl/chro... chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc:341: content::TestBrowserThreadBundle::IO_MAINLOOP); These are because the NQE expects a MessageLoop on construction, unlike the rest of TestURLRequestContext, which only needs one when the first URLRequest is started.
https://codereview.chromium.org/2484323002/diff/60001/net/url_request/url_req... File net/url_request/url_request_test_util.cc (right): https://codereview.chromium.org/2484323002/diff/60001/net/url_request/url_req... net/url_request/url_request_test_util.cc:145: params.socket_performance_watcher_factory = Currently, the problem is that in some tests, |params| does not have NQE set. With this fix, NQE will be set for params, but in some tests, |params| will have a different NQE than the context. Would a better solution be for NQE tests to override the |params| too? Similar to: https://cs.chromium.org/chromium/src/net/nqe/network_quality_estimator_unitte... If yes, I can do that for all NQE tests since I have already done it for one other test. wdyt?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
https://codereview.chromium.org/2484323002/diff/60001/net/url_request/url_req... File net/url_request/url_request_test_util.cc (right): https://codereview.chromium.org/2484323002/diff/60001/net/url_request/url_req... net/url_request/url_request_test_util.cc:145: params.socket_performance_watcher_factory = On 2016/11/14 20:26:01, tbansal1 wrote: > Currently, the problem is that in some tests, |params| does not have NQE set. > With this fix, NQE will be set for params, but in some tests, |params| will have > a different NQE than the context. > > Would a better solution be for NQE tests to override the |params| too? > Similar to: > https://cs.chromium.org/chromium/src/net/nqe/network_quality_estimator_unitte... > If yes, I can do that for all NQE tests since I have already done it for one > other test. wdyt? A better solution instead of this CL, or in addition to this CL? The goal of this CL is to make TestURLRequestContext better reflect the main URLRequestContext in production code, and that includes the NQE. Even if most tests using the TestURLRequestContext don't explicitly check the NQE, this will let them exercise its code, and make sure it doesn't crash or DCHECK under a greater variety of circumstances than it makes sense to have explicit NQE tests for.
On 2016/11/14 20:29:52, mmenke wrote: > https://codereview.chromium.org/2484323002/diff/60001/net/url_request/url_req... > File net/url_request/url_request_test_util.cc (right): > > https://codereview.chromium.org/2484323002/diff/60001/net/url_request/url_req... > net/url_request/url_request_test_util.cc:145: > params.socket_performance_watcher_factory = > On 2016/11/14 20:26:01, tbansal1 wrote: > > Currently, the problem is that in some tests, |params| does not have NQE set. > > With this fix, NQE will be set for params, but in some tests, |params| will > have > > a different NQE than the context. > > > > Would a better solution be for NQE tests to override the |params| too? > > Similar to: > > > https://cs.chromium.org/chromium/src/net/nqe/network_quality_estimator_unitte... > > If yes, I can do that for all NQE tests since I have already done it for one > > other test. wdyt? > > A better solution instead of this CL, or in addition to this CL? > > The goal of this CL is to make TestURLRequestContext better reflect the main > URLRequestContext in production code, and that includes the NQE. Even if most > tests using the TestURLRequestContext don't explicitly check the NQE, this will > let them exercise its code, and make sure it doesn't crash or DCHECK under a > greater variety of circumstances than it makes sense to have explicit NQE tests > for. Note: I've fixed the compile error, but uploading a new patch set claims it's succeeding, but isn't doing anything.
The CQ bit was checked by mmenke@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm. Thanks for doing this. If you have problems fixing NQE tests, please let me know. https://codereview.chromium.org/2484323002/diff/60001/net/nqe/network_quality... File net/nqe/network_quality_estimator_unittest.cc (right): https://codereview.chromium.org/2484323002/diff/60001/net/nqe/network_quality... net/nqe/network_quality_estimator_unittest.cc:176: // TODO(mmenke): Fix that? can you reassign these to me. As mentioned elsewhere, I will change the tests so that they override NQE in the params too. https://codereview.chromium.org/2484323002/diff/60001/net/url_request/url_req... File net/url_request/url_request_test_util.cc (right): https://codereview.chromium.org/2484323002/diff/60001/net/url_request/url_req... net/url_request/url_request_test_util.cc:145: params.socket_performance_watcher_factory = On 2016/11/14 20:29:52, mmenke wrote: > On 2016/11/14 20:26:01, tbansal1 wrote: > > Currently, the problem is that in some tests, |params| does not have NQE set. > > With this fix, NQE will be set for params, but in some tests, |params| will > have > > a different NQE than the context. > > > > Would a better solution be for NQE tests to override the |params| too? > > Similar to: > > > https://cs.chromium.org/chromium/src/net/nqe/network_quality_estimator_unitte... > > If yes, I can do that for all NQE tests since I have already done it for one > > other test. wdyt? > > A better solution instead of this CL, or in addition to this CL? "In addition to". OK, I will do that after this CL is submitted. > > The goal of this CL is to make TestURLRequestContext better reflect the main > URLRequestContext in production code, and that includes the NQE. Even if most > tests using the TestURLRequestContext don't explicitly check the NQE, this will > let them exercise its code, and make sure it doesn't crash or DCHECK under a > greater variety of circumstances than it makes sense to have explicit NQE tests > for. Got it.
https://codereview.chromium.org/2484323002/diff/60001/net/nqe/network_quality... File net/nqe/network_quality_estimator_unittest.cc (right): https://codereview.chromium.org/2484323002/diff/60001/net/nqe/network_quality... net/nqe/network_quality_estimator_unittest.cc:176: // TODO(mmenke): Fix that? On 2016/11/14 20:39:27, tbansal1 wrote: > can you reassign these to me. As mentioned elsewhere, I will change the tests so > that they override NQE in the params too. Do you want to do it, or would you rather me do it? This comment implies the former, "If you have problems fixing NQE tests, please let me know" implies the former. I'm happy to just update expectations according to the errors I get with setting the NQE in the params as well (I'm reluctant to dig further into the code and figure if those updates are reasonable, just because I don't think there's much benefit in me learning the low level details of how NQE works - the higher level details of how it's hooked into URLRequest may be useful to me in the future, but not the socket layer stuff).
On 2016/11/14 20:43:02, mmenke wrote: > https://codereview.chromium.org/2484323002/diff/60001/net/nqe/network_quality... > File net/nqe/network_quality_estimator_unittest.cc (right): > > https://codereview.chromium.org/2484323002/diff/60001/net/nqe/network_quality... > net/nqe/network_quality_estimator_unittest.cc:176: // TODO(mmenke): Fix that? > On 2016/11/14 20:39:27, tbansal1 wrote: > > can you reassign these to me. As mentioned elsewhere, I will change the tests > so > > that they override NQE in the params too. > > Do you want to do it, or would you rather me do it? This comment implies the > former, "If you have problems fixing NQE tests, please let me know" implies the > former. I can do it since I am familiar with the low level details of NQE. Sorry for the confusion. "If you have problems fixing NQE tests, please let me know" was for the current CL in the current state -- If there are NQE test failures that are time-consuimg to debug, then it might be easier for me to dig into them. > > I'm happy to just update expectations according to the errors I get with setting > the NQE in the params as well (I'm reluctant to dig further into the code and > figure if those updates are reasonable, just because I don't think there's much > benefit in me learning the low level details of how NQE works - the higher level > details of how it's hooked into URLRequest may be useful to me in the future, > but not the socket layer stuff).
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by mmenke@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by mmenke@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by mmenke@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
mmenke@chromium.org changed reviewers: + palmer@chromium.org, tedchoc@chromium.org
palmer: Please review chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc (TestURLRequestContext must now be created on a thread with a message loop) tedchoc: Please review content/browser/android/url_request_content_job_unittest.cc (Same thing - message loop must be set up before creating the TestURLRequestContext, which seems a good idea anyways, as using the context requires a MessageLoop to exist, anyways.
Oops, let's try that again, making things more legible. [+palmer]: Please review chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc (TestURLRequestContext must now be created on a thread with a message loop) [+tedchoc]: Please review content/browser/android/url_request_content_job_unittest.cc (Same thing - message loop must be set up before creating the TestURLRequestContext, which seems a good idea anyways, as using the context requires a MessageLoop to exist, anyways.
lgtm
On 2016/11/15 19:53:04, palmer wrote: > lgtm lgtm
The CQ bit was checked by mmenke@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from tbansal@chromium.org Link to the patchset: https://codereview.chromium.org/2484323002/#ps140001 (title: "Update comments, fix Android tests")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Add a NetworkQualityEstimator to TestURLRequestContext. This was inspired by a bug in exercised NetworkQualityEstimator NQE codepath, though this CL would not have caught the issue. BUG=663456 ========== to ========== Add a NetworkQualityEstimator to TestURLRequestContext. This was inspired by a bug in exercised NetworkQualityEstimator NQE codepath, though this CL would not have caught the issue. BUG=663456 ==========
Message was sent while issue was closed.
Committed patchset #8 (id:140001)
Message was sent while issue was closed.
Description was changed from ========== Add a NetworkQualityEstimator to TestURLRequestContext. This was inspired by a bug in exercised NetworkQualityEstimator NQE codepath, though this CL would not have caught the issue. BUG=663456 ========== to ========== Add a NetworkQualityEstimator to TestURLRequestContext. This was inspired by a bug in exercised NetworkQualityEstimator NQE codepath, though this CL would not have caught the issue. BUG=663456 Committed: https://crrev.com/5ce3e1f8fef0f96ae28a09ac0aba2dc49802f9ee Cr-Commit-Position: refs/heads/master@{#432277} ==========
Message was sent while issue was closed.
Patchset 8 (id:??) landed as https://crrev.com/5ce3e1f8fef0f96ae28a09ac0aba2dc49802f9ee Cr-Commit-Position: refs/heads/master@{#432277}
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:140001) has been created in https://codereview.chromium.org/2506303002/ by eroman@chromium.org. The reason for reverting is: May be the cause of increase net_unittests flake, speculatively reverting (see comment #20) BUG=665686. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
