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

Issue 2822883002: Fix test slowness introduced by https://codereview.chromium.org/2771793003 (Closed)

Created:
3 years, 8 months ago by pkotwicz
Modified:
3 years, 8 months ago
Reviewers:
dominickn, Xi Han
CC:
chromium-reviews, zpeng+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix test slowness introduced by https://codereview.chromium.org/2771793003 https://codereview.chromium.org/2771793003 moved the the timer for downloading an icon from webapk_installer.cc to webapk_icon_hasher.cc The CL did not provide a way of making the timeout shorter similar to WebApkInstaller::SetTimeoutMs(). This was causing WebApkInstallerTest.BestPrimaryIconUrlDownloadTimesOut and WebApkInstallerTest.BestBadgeIconUrlDownloadTimesOut to take over a minute each. This CL: - Introduces a new static method WebApkIconHasher::DownloadAndComputeMurmur2HashWithTimeout() which takes a custom timeout. - Removes the tests about the icon download timing out from webapk_installer_unittest.cc since this scenario is already tested in webapk_icon_hasher_unittest.cc Review-Url: https://codereview.chromium.org/2822883002 Cr-Commit-Position: refs/heads/master@{#465750} Committed: https://chromium.googlesource.com/chromium/src/+/e7c580f5192add33af200317f7097b2b1b3d4910

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -13 lines) Patch
M chrome/browser/android/webapk/webapk_icon_hasher.h View 1 chunk +8 lines, -2 lines 0 comments Download
M chrome/browser/android/webapk/webapk_icon_hasher.cc View 2 chunks +14 lines, -3 lines 2 comments Download
M chrome/browser/android/webapk/webapk_icon_hasher_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/android/webapk/webapk_installer_unittest.cc View 2 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 12 (5 generated)
pkotwicz
Xi, can you please take a look?
3 years, 8 months ago (2017-04-15 01:46:47 UTC) #2
Xi Han
lgtm
3 years, 8 months ago (2017-04-18 15:38:10 UTC) #3
pkotwicz
Dominick, can you please take a look?
3 years, 8 months ago (2017-04-18 18:45:36 UTC) #5
dominickn
lgtm % nit https://codereview.chromium.org/2822883002/diff/1/chrome/browser/android/webapk/webapk_icon_hasher.cc File chrome/browser/android/webapk/webapk_icon_hasher.cc (right): https://codereview.chromium.org/2822883002/diff/1/chrome/browser/android/webapk/webapk_icon_hasher.cc#newcode48 chrome/browser/android/webapk/webapk_icon_hasher.cc:48: void WebApkIconHasher::DownloadAndComputeMurmur2HashWithTimeout( Nit: I would call ...
3 years, 8 months ago (2017-04-19 00:04:08 UTC) #6
pkotwicz
https://codereview.chromium.org/2822883002/diff/1/chrome/browser/android/webapk/webapk_icon_hasher.cc File chrome/browser/android/webapk/webapk_icon_hasher.cc (right): https://codereview.chromium.org/2822883002/diff/1/chrome/browser/android/webapk/webapk_icon_hasher.cc#newcode48 chrome/browser/android/webapk/webapk_icon_hasher.cc:48: void WebApkIconHasher::DownloadAndComputeMurmur2HashWithTimeout( I don't thinkat that DownloadAndComputeMurmur2HashForTesting() is a ...
3 years, 8 months ago (2017-04-19 20:34:53 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2822883002/1
3 years, 8 months ago (2017-04-19 20:35:29 UTC) #9
commit-bot: I haz the power
3 years, 8 months ago (2017-04-19 21:17:45 UTC) #12
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/e7c580f5192add33af200317f709...

Powered by Google App Engine
This is Rietveld 408576698