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

Issue 2424533002: Modify sync unit test to use standard sql::test:: helper. (Closed)

Created:
4 years, 2 months ago by Scott Hess - ex-Googler
Modified:
4 years, 2 months ago
Reviewers:
maxbogue, Gang Wu
CC:
chromium-reviews, sync-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Modify sync unit test to use standard sql::test:: helper. Sync tests for DirectoryBackingStore overwrote/truncated the underlying database file, which SQLite did not notice because of exclusive locking and the page cache. So then the tests accessed a lot of data to defeat that. This is brittle in the face of various changes to how sql::Connection sets up the underlying sqlite3 handle. Add sql::test::CorruptSizeInHeaderWithLock() to allow corrupting the database while SQLite connections are outstanding. Remove set_exclusive_locking() for DirectoryBackingStore to allow CorruptSizeInHeaderWithLock() to run. Removing set_exclusive_locking() should not cause notable performance degradation. SQLite keeps a cookie in the header page to track database changes, which allows it to re-used cache pages. So there will be uncontended locking (because nobody else locks the file), and the header read should be from warm filesystem cache. BUG=533682 Committed: https://crrev.com/4640cc232029f854e84455d2087ca071a3870ee6 Cr-Commit-Position: refs/heads/master@{#426316}

Patch Set 1 #

Patch Set 2 : Add on changes for sync_integration_tests. #

Patch Set 3 : BUILD.gn merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -96 lines) Patch
M chrome/browser/sync/test/integration/single_client_directory_sync_test.cc View 1 2 chunks +7 lines, -18 lines 0 comments Download
M components/sync/BUILD.gn View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M components/sync/syncable/directory_backing_store.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M components/sync/syncable/directory_backing_store_unittest.cc View 1 2 2 chunks +3 lines, -9 lines 0 comments Download
D components/sync/test/directory_backing_store_corruption_testing.h View 1 1 chunk +0 lines, -27 lines 0 comments Download
D components/sync/test/directory_backing_store_corruption_testing.cc View 1 1 chunk +0 lines, -39 lines 0 comments Download
M sql/test/test_helpers.h View 1 2 chunks +10 lines, -0 lines 0 comments Download
M sql/test/test_helpers.cc View 1 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (15 generated)
Scott Hess - ex-Googler
Add on changes for sync_integration_tests.
4 years, 2 months ago (2016-10-14 22:55:28 UTC) #3
Scott Hess - ex-Googler
I broke it in pieces so you can see what changed. Main diff is to ...
4 years, 2 months ago (2016-10-14 23:07:09 UTC) #7
Gang Wu
lgtm
4 years, 2 months ago (2016-10-19 00:30:21 UTC) #12
Gang Wu
lgtm
4 years, 2 months ago (2016-10-19 00:30:23 UTC) #13
maxbogue
lgtm, thanks Scott!
4 years, 2 months ago (2016-10-19 17:16:03 UTC) #14
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/2424533002/20001
4 years, 2 months ago (2016-10-19 18:29:20 UTC) #16
commit-bot: I haz the power
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/90324) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 2 months ago (2016-10-19 18:32:53 UTC) #18
Scott Hess - ex-Googler
BUILD.gn merge
4 years, 2 months ago (2016-10-19 19:43:53 UTC) #19
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/2424533002/40001
4 years, 2 months ago (2016-10-19 19:46:11 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago (2016-10-19 22:47:50 UTC) #24
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 13:12:37 UTC) #26
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/4640cc232029f854e84455d2087ca071a3870ee6
Cr-Commit-Position: refs/heads/master@{#426316}

Powered by Google App Engine
This is Rietveld 408576698