Merge lp:~cmiller/desktopcouch/get-port-through-dbus-again into lp:desktopcouch
- get-port-through-dbus-again
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Chad Miller |
Approved revision: | 192 |
Merged at revision: | 232 |
Proposed branch: | lp:~cmiller/desktopcouch/get-port-through-dbus-again |
Merge into: | lp:desktopcouch |
Diff against target: |
51 lines (+12/-17) 2 files modified
desktopcouch/application/migration/tests/test_migration.py (+4/-0) desktopcouch/application/platform/linux/__init__.py (+8/-17) |
To merge this branch: | bzr merge lp:~cmiller/desktopcouch/get-port-through-dbus-again |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chad Miller (community) | Approve | ||
Vincenzo Di Somma (community) | Approve | ||
Eric Casteleijn (community) | Approve | ||
Review via email: mp+39778@code.launchpad.net |
Commit message
Again get port from DBus. The only client (AFAIK) that experienced the problem in the deleted comment was Gwibber. (LP: #519028)
Description of the change
Vincenzo Di Somma (vds) : | # |
dobey (dobey) wrote : | # |
Attempt to merge into lp:desktopcouch failed due to conflicts:
text conflict in desktopcouch/
dobey (dobey) wrote : | # |
There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.
dobey (dobey) wrote : | # |
The attempt to merge lp:~cmiller/desktopcouch/get-port-through-dbus-again into lp:desktopcouch failed. Below is the output from the failed tests.
running build
running build_py
creating build
creating build/lib.
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
dobey (dobey) wrote : | # |
The attempt to merge lp:~cmiller/desktopcouch/get-port-through-dbus-again into lp:desktopcouch failed. Below is the output from the failed tests.
running build
running build_py
creating build
creating build/lib.
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
dobey (dobey) wrote : | # |
The attempt to merge lp:~cmiller/desktopcouch/get-port-through-dbus-again into lp:desktopcouch failed. Below is the output from the failed tests.
running build
running build_py
creating build
creating build/lib.
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
dobey (dobey) wrote : | # |
The attempt to merge lp:~cmiller/desktopcouch/get-port-through-dbus-again into lp:desktopcouch failed. Below is the output from the failed tests.
running build
running build_py
creating build
creating build/lib.
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
dobey (dobey) wrote : | # |
Attempt to merge into lp:desktopcouch failed due to conflicts:
text conflict in desktopcouch/
dobey (dobey) wrote : | # |
The attempt to merge lp:~cmiller/desktopcouch/get-port-through-dbus-again into lp:desktopcouch failed. Below is the output from the failed tests.
running build
running build_py
creating build
creating build/lib.
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
copying desktopcouch/
creating build/lib.
copying desktopcouch/
Ubuntu One Auto Pilot (otto-pilot) wrote : | # |
The attempt to merge lp:~cmiller/desktopcouch/get-port-through-dbus-again into lp:desktopcouch failed. Below is the output from the failed tests.
Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file://
desktopcouch.
TestUpdateDes
test_
desktopcouch.
TestService
test_
test_
test_
desktopcouch.
TestKeyringIn
test_with_auth ... [OK]
test_
TestLocalFiles
test_
test_
test_
test_
desktopcouch.
TestReplication
test_creation ... Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file://
TestUbuntuone
test_exclusion ... Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file://
desktopcouch.
TestMigration
test_
test_
test_
TestRegistration
test_
desktopcouch.
TestKeyring
test_
test_
test_
test_
desktopcouch.
TestCouchdbIo
test_
test_
test_mkuri ... [OK]
test_
test_
test_
desktopcouch.
TestUbunton...
- 190. By Chad Miller
-
merge trunk
- 191. By Chad Miller
-
Repair missing import from previous patch.
- 192. By Chad Miller
-
Fix bogus test failure where other tests polluted deleted-record test.
Chad Miller (cmiller) : | # |
Preview Diff
1 | === modified file 'desktopcouch/application/migration/tests/test_migration.py' |
2 | --- desktopcouch/application/migration/tests/test_migration.py 2010-11-26 18:52:54 +0000 |
3 | +++ desktopcouch/application/migration/tests/test_migration.py 2010-11-29 01:21:35 +0000 |
4 | @@ -92,6 +92,10 @@ |
5 | super(TestMigration, self).setUp() |
6 | self.trash = DesktopDatabase(DCTRASH, create=True, ctx=self.ctx) |
7 | |
8 | + for document_id in self.trash.db: |
9 | + # remove documents added from other tests. |
10 | + del self.trash.db[document_id] |
11 | + |
12 | def tearDown(self): |
13 | """tear down each test""" |
14 | del self.database._server[DCTRASH] |
15 | |
16 | === modified file 'desktopcouch/application/platform/linux/__init__.py' |
17 | --- desktopcouch/application/platform/linux/__init__.py 2010-11-26 18:52:54 +0000 |
18 | +++ desktopcouch/application/platform/linux/__init__.py 2010-11-29 01:21:35 +0000 |
19 | @@ -92,24 +92,15 @@ |
20 | """Ask the service daemon through DBUS what the port is. This should start |
21 | it up if it isn't running.""" |
22 | |
23 | - return direct_access_find_port(pid=pid, ctx=ctx) |
24 | -#### |
25 | -#### |
26 | -#### |
27 | -#### This fails in multithreaded execution in the client, apparenly |
28 | -#### in DBus. Chad's guess is that there is some collision in getting |
29 | -#### a unique sequence ID for the asynchronous DBus method-call/ |
30 | -#### method-response. Once that is worked out, resume using the |
31 | -#### rest of this function instead of the direct access above. |
32 | # Hrm, we don't use 'pid' or 'ctx' any more, since we go through DBus. |
33 | -### if ctx != local_files.DEFAULT_CONTEXT or pid is not None: |
34 | -### return direct_access_find_port(pid=pid, ctx=ctx) |
35 | -### |
36 | -### bus = dbus.SessionBus() |
37 | -### proxy = bus.get_object('org.desktopcouch.CouchDB', '/') |
38 | -### return proxy.getPort() |
39 | -#### |
40 | -#### ^^ |
41 | + from desktopcouch import local_files |
42 | + if ctx != local_files.DEFAULT_CONTEXT or pid is not None: |
43 | + return direct_access_find_port(pid=pid, ctx=ctx) |
44 | + |
45 | + import dbus |
46 | + bus = dbus.SessionBus() |
47 | + proxy = bus.get_object('org.desktopcouch.CouchDB', '/') |
48 | + return proxy.getPort() |
49 | |
50 | |
51 | def direct_access_find_port(pid=None, ctx=None, retries_left=3): |
looks great, tests pass.