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

Issue 1622012: Python sync server impl, for test (Closed)

Created:
10 years, 8 months ago by ncarter (slow)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ncarter (slow), ben+cc_chromium.org, idana, darin-cc_chromium.org, Paweł Hajdan Jr., pam+watch_chromium.org, tim (not reviewing), chromium-reviews_googlegroups.com, cbentzel+watch_chromium.org
Visibility:
Public.

Description

[Third time landing] Python implementation of sync server, for testing. Implement the server side of chromium sync inside of testserver.py. The implementation supports at most one account (and ignores authentication credentials), but is otherwise reasonably full featured. Make the sync_integration_tests run by default against the test server. An externally-provided --sync-url will give the old behavior. Protocol buffers stuff: The test sync server requires Python generated code for .proto files. I've put generated code, as well as the python protocol buffers runtime library, in the output directory + "/python" (e.g, on windows, src/chrome/Debug/python/google/protobuf). Flakiness fix: In the InProcessBrowserTest framework, improve the mechanism for tests that want to manually set up a user data directory. The new way ensures that the user data directory is always wiped; tests can't accidentally forget to do this anymore. Flakiness fix: Make testserver try to /kill any old instance that might be hogging the port. Very useful if a test failure leaves a server running. Tested this against all combos of protocols, and it seems to work. Flakiness fix: Port sync_integration_tests to the out-of-process test runner. Flakiness fix: For IN_PROC_BROWSER_TESTS, don't run the test body if the setup triggered a fatal (ASSERT_) failure. BUG=20905, 40980 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=44708 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=45916 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=46040

Patch Set 1 #

Patch Set 2 : Patch set for self-review. #

Patch Set 3 : Self-review fixes. #

Patch Set 4 : Added unit tests for chromiumsync.py #

Total comments: 33

Patch Set 5 : Code review fixes. #

Patch Set 6 : Shebangs, shebangs. #

Patch Set 7 : Move python output dir from 'python' to 'pyproto' #

Patch Set 8 : Remove debugging code. #

Patch Set 9 : Clean newlines for trybot. #

Patch Set 10 : Clean newlines for trybot. #

Total comments: 1

Patch Set 11 : Split sync proto generation into separate .gyp file #

Patch Set 12 : Add sync_proto.gyp #

Total comments: 2

Patch Set 13 : Gyp hacking (trying to green the trybot) #

Patch Set 14 : Fix Linux build. #

Patch Set 15 : Linux unit_test fix. #

Patch Set 16 : Tried on Linux (mac passes clean) #

Patch Set 17 : Patch on Mac #

Patch Set 18 : Patch on Windows #

Patch Set 19 : Rebase. #

Patch Set 20 : Tweak. #

Patch Set 21 : Failed commit attempt #2 #

Patch Set 22 : Fixed gyp bug ( :) ) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2435 lines, -98 lines) Patch
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
A chrome/browser/sync/protocol/sync_proto.gyp View 12 13 14 15 16 17 18 19 20 21 1 chunk +73 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +4 lines, -54 lines 0 comments Download
M chrome/chrome_browser.gypi View 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_tests.gypi View 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +7 lines, -5 lines 0 comments Download
M chrome/test/in_process_browser_test.h View 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/test/in_process_browser_test.cc View 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +8 lines, -4 lines 0 comments Download
M chrome/test/live_sync/live_sync_test.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +23 lines, -0 lines 0 comments Download
M chrome/test/live_sync/two_client_live_bookmarks_sync_test.cc View 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 8 chunks +18 lines, -24 lines 0 comments Download
M chrome/test/memory_test/memory_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/net.gyp View 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -0 lines 0 comments Download
M net/socket/ssl_test_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +8 lines, -1 line 0 comments Download
A net/tools/testserver/chromiumsync.py View 1 2 3 4 5 6 7 1 chunk +653 lines, -0 lines 0 comments Download
A net/tools/testserver/chromiumsync_test.py View 1 2 3 4 1 chunk +317 lines, -0 lines 0 comments Download
M net/tools/testserver/testserver.py View 1 2 3 4 5 6 7 8 7 chunks +58 lines, -3 lines 0 comments Download
A third_party/protobuf2/__init__.py View 3 4 5 6 7 8 9 10 11 12 13 18 19 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/protobuf2/descriptor_pb2.py View 1 chunk +1172 lines, -0 lines 0 comments Download
M third_party/protobuf2/protobuf.gyp View 2 3 4 5 6 7 8 9 10 11 12 2 chunks +81 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
ncarter (slow)
Hi Zach, Please review.
10 years, 8 months ago (2010-04-09 20:50:52 UTC) #1
Zachary Kuznia
__init__.py seems to be empty. Is this intentional? http://codereview.chromium.org/1622012/diff/8001/9001 File chrome/browser/sync/engine/syncer_proto_util.cc (right): http://codereview.chromium.org/1622012/diff/8001/9001#newcode1 chrome/browser/sync/engine/syncer_proto_util.cc:1: // ...
10 years, 8 months ago (2010-04-09 23:07:12 UTC) #2
ncarter (slow)
Patch set updated. It is correct for __init__.py to be empty. See http://groups.google.com/group/protobuf/browse_thread/thread/401e6e54e6b4657b?fwc=1&pli=1 for a ...
10 years, 8 months ago (2010-04-13 20:12:30 UTC) #3
ncarter (slow)
Adding bradnelson as a second reviewer, due to the gyp complexity that arose on Mac. ...
10 years, 8 months ago (2010-04-14 00:43:18 UTC) #4
bradn
So the gyp looks reasonable. Adding a 3rd thing to break the cycle sounds good, ...
10 years, 8 months ago (2010-04-14 01:41:58 UTC) #5
ncarter (slow)
FYI: There are apparently still some unresolved issues with the testserver/unittest/gyp integration. I'm working on ...
10 years, 8 months ago (2010-04-14 19:20:52 UTC) #6
Zachary Kuznia
Python LGTM http://codereview.chromium.org/1622012/diff/8001/9007 File chrome/test/live_sync/live_sync_test.h (right): http://codereview.chromium.org/1622012/diff/8001/9007#newcode63 chrome/test/live_sync/live_sync_test.h:63: server_.kHostName, server_.kOKHTTPSPort, On 2010/04/13 20:12:30, nick wrote: ...
10 years, 8 months ago (2010-04-14 22:27:35 UTC) #7
Timur Iskhodzhanov
Hi Nick, looks like your CL has made half of the Memory waterfall red.
10 years, 7 months ago (2010-04-30 07:31:12 UTC) #8
Timur Iskhodzhanov
The CL was reverted ( http://codereview.chromium.org/1822001 ). You can find the post-mortem here http://codereview.chromium.org/1736026 (the ...
10 years, 7 months ago (2010-04-30 10:02:28 UTC) #9
Timur Iskhodzhanov
10 years, 7 months ago (2010-04-30 15:15:30 UTC) #10
Re-landed as http://codereview.chromium.org/1763023
On 2010/04/30 10:02:28, Timur Iskhodzhanov wrote:
> The CL was reverted ( http://codereview.chromium.org/1822001 ).
> You can find the post-mortem here http://codereview.chromium.org/1736026 (the
> issue seems to be fixed)
> I'll try to revert the revert soon.

Powered by Google App Engine
This is Rietveld 408576698