Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Issue 1098253005: Cronet: Fix CronetUploadTest.testDestroyAdapterBefore* tests. (Closed)

Created:
5 years, 8 months ago by mmenke
Modified:
5 years, 8 months ago
Reviewers:
xunjieli
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cronet: Fix CronetUploadTest.testDestroyAdapterBefore* tests. The tests weren't actually destroying the adapter when they claimed. As a result, the final read/rewind call could happen on the "network" thread between starting the destroy task in Shutdown and actually tearing down the network thread, at which point the TestUploadDataStreamHandler network thread pointer is NULL, resulting in a crash. The fix is just to destroy the adapters when they should be, at which point there should be no messages pending on the network thread. May be worth revising how thread checks are done if more tests are added. BUG=480623 Committed: https://crrev.com/ea69e72231b085781569d037bd61a583d16a5912 Cr-Commit-Position: refs/heads/master@{#326852}

Patch Set 1 #

Patch Set 2 : Update comments #

Total comments: 2

Patch Set 3 : Update comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -15 lines) Patch
M components/cronet/android/test/javatests/src/org/chromium/net/CronetUploadTest.java View 1 2 4 chunks +16 lines, -13 lines 0 comments Download
M components/cronet/android/test/src/org/chromium/net/TestUploadDataStreamHandler.java View 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
mmenke
5 years, 8 months ago (2015-04-24 17:16:56 UTC) #2
xunjieli
I didn't realize that we passed the ownership of the adapter to the handler. I ...
5 years, 8 months ago (2015-04-24 18:01:10 UTC) #3
mmenke
Thanks for the feedback - as always, well thought out. https://codereview.chromium.org/1098253005/diff/20001/components/cronet/android/test/javatests/src/org/chromium/net/CronetUploadTest.java File components/cronet/android/test/javatests/src/org/chromium/net/CronetUploadTest.java (right): https://codereview.chromium.org/1098253005/diff/20001/components/cronet/android/test/javatests/src/org/chromium/net/CronetUploadTest.java#newcode244 ...
5 years, 8 months ago (2015-04-24 18:22:17 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1098253005/40001
5 years, 8 months ago (2015-04-24 18:23:59 UTC) #6
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
5 years, 8 months ago (2015-04-24 18:24:01 UTC) #8
mmenke
Oops...thought you signed off. :)
5 years, 8 months ago (2015-04-24 18:25:31 UTC) #9
xunjieli
On 2015/04/24 18:25:31, mmenke (Out 4-27 to 5-1) wrote: > Oops...thought you signed off. :) ...
5 years, 8 months ago (2015-04-24 18:40:20 UTC) #10
mmenke
On 2015/04/24 18:40:20, xunjieli wrote: > On 2015/04/24 18:25:31, mmenke (Out 4-27 to 5-1) wrote: ...
5 years, 8 months ago (2015-04-24 18:43:04 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1098253005/40001
5 years, 8 months ago (2015-04-24 18:44:21 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 8 months ago (2015-04-24 19:06:58 UTC) #14
commit-bot: I haz the power
5 years, 8 months ago (2015-04-24 19:07:49 UTC) #15
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/ea69e72231b085781569d037bd61a583d16a5912
Cr-Commit-Position: refs/heads/master@{#326852}

Powered by Google App Engine
This is Rietveld 408576698