Merge lp://qastaging/~vds/desktopcouch/views-with-reconnector-proxy into lp://qastaging/desktopcouch

Proposed by Vincenzo Di Somma
Status: Merged
Approved by: Manuel de la Peña
Approved revision: 184
Merged at revision: 175
Proposed branch: lp://qastaging/~vds/desktopcouch/views-with-reconnector-proxy
Merge into: lp://qastaging/desktopcouch
Diff against target: 480 lines (+172/-21)
4 files modified
desktopcouch/records/server_base.py (+77/-15)
desktopcouch/records/tests/test_server.py (+86/-4)
desktopcouch/start_local_couchdb.py (+8/-1)
desktopcouch/stop_local_couchdb.py (+1/-1)
To merge this branch: bzr merge lp://qastaging/~vds/desktopcouch/views-with-reconnector-proxy
Reviewer Review Type Date Requested Status
Manuel de la Peña (community) Approve
Eric Casteleijn (community) Approve
Review via email: mp+35853@code.qastaging.launchpad.net

Commit message

Now View and ViewResults can reconnect if the couchdb server crashes.

Description of the change

Now ViewResult reconnects when the server crashes.

To post a comment you must log in.
Revision history for this message
Eric Casteleijn (thisfred) wrote :
Download full text (40.6 KiB)

Ooooh, live monkeys!

Code looks good, but the tests take ages now, and it looks like the server is killed and restarted way too often, though most of the tests seem to pass. Adding test output below. If this is all intentional, approved.

One test does fail, but I believe that's because I'm on lucid:

===============================================================================
[ERROR]: desktopcouch.pair.tests.test_ubuntuone_pairing

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/twisted/trial/runner.py", line 563, in loadPackage
    module = modinfo.load()
  File "/usr/lib/python2.6/dist-packages/twisted/python/modules.py", line 381, in load
    return self.pathEntry.pythonPath.moduleLoader(self.name)
  File "/usr/lib/python2.6/dist-packages/twisted/python/reflect.py", line 464, in namedAny
    topLevelPackage = _importAndCheckStack(trialname)
  File "/home/eric/canonical/desktopcouch/r-vds/desktopcouch/pair/tests/test_ubuntuone_pairing.py", line 19, in <module>
    from mocker import Mocker
exceptions.ImportError: No module named mocker
-------------------------------------------------------------------------------

eric@eric-laptop:~/canonical/desktopcouch/r-vds$ PYTHONPATH=. trial desktopcouch
Apache CouchDB has started, time to relax.
Browse your desktop CouchDB at file:///tmp/tmpEaIpq4/data/couchdb.html
desktopcouch.bookmarks.tests.test_record
  TestBookmarkRecord
    test_bookmark_record ... [OK]
  TestFeedRecord
    test_feed_record ... [OK]
  TestFolderRecord
    test_folder_record ... [OK]
  TestSeparatorRecord
    test_separator_record ... [OK]
desktopcouch.contacts.tests.test_contactspicker
  TestContactsPicker
    test_can_contruct_contactspicker ... [OK]
desktopcouch.contacts.tests.test_create
  TestCreate
    test_create_many_contacts ... [OK]
    test_head_or_tails ... [OK]
    test_random_bools ... [OK]
desktopcouch.contacts.tests.test_record
  TestContactRecord
    test_contact_record ... [OK]
desktopcouch.contacts.tests.test_view
  TestLocalFiles
    test_find_contact_starting ... [OK]
    test_find_contacts_exact ... [OK]
desktopcouch.notes.tests.test_record
  TestNoteRecord
    test_note_record ... [OK]
desktopcouch.pair.tests.test_couchdb_io
  TestCouchdbIo
    test_get_database_names_replicatable ... [OK]
    test_get_database_names_replicatable_bad_server ... [SKIPPED]
    test_get_my_host_unique_id ... [OK]
    test_mkuri ... [OK]
    test_obsfuscation ... [OK]
   ...

review: Approve
Revision history for this message
Vincenzo Di Somma (vds) wrote :

> Ooooh, live monkeys!
>
> Code looks good, but the tests take ages now, and it looks like the server is
> killed and restarted way too often, though most of the tests seem to pass.
> Adding test output below. If this is all intentional, approved.
>
> One test does fail, but I believe that's because I'm on lucid:

About the test failing, mocker is in Lucid and should also be a developer dependency, if you install the package the test will pass, I'll file a bug to update our dependency packages.

The couchdb server is killed and restarted many time on purpose, to check that desktopcouch is able to reconnect to a different instance of couchdb if the previous one crashed.
It slows down the tests a lot I know. But there's not much we can do here apart from moving that logic somewhere else, like in python-couchdb.
the weird text couchdb's fault, I'll try to hide it in the next branch.

Revision history for this message
Manuel de la Peña (mandel) wrote :

All tests pass. I just have a question, dont we have a better name for a method than _is_bug_lp539674. I know we can go to lp and check that out, but it would be nice a more self explanatory name.

Revision history for this message
Manuel de la Peña (mandel) wrote :

Cool +!

review: Approve
Revision history for this message
dobey (dobey) wrote :
Download full text (109.7 KiB)

The attempt to merge lp:~vds/desktopcouch/views-with-reconnector-proxy into lp:desktopcouch failed. Below is the output from the failed tests.

running build
running build_py
creating build
creating build/lib.linux-i686-2.6
creating build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/stop_local_couchdb.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/start_local_couchdb.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/replication.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/local_files.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/__init__.py -> build/lib.linux-i686-2.6/desktopcouch
creating build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/test_start_local_couchdb.py -> build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/test_local_files.py -> build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/test_replication.py -> build/lib.linux-i686-2.6/desktopcouch/tests
creating build/lib.linux-i686-2.6/desktopcouch/tasks
copying desktopcouch/tasks/record.py -> build/lib.linux-i686-2.6/desktopcouch/tasks
copying desktopcouch/tasks/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/tasks
creating build/lib.linux-i686-2.6/desktopcouch/pair
copying desktopcouch/pair/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/pair
creating build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/field_registry.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/record.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/server.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/couchgrid.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/server_base.py -> build/lib.linux-i686-2.6/desktopcouch/records
creating build/lib.linux-i686-2.6/desktopcouch/replication_services
copying desktopcouch/replication_services/ubuntuone.py -> build/lib.linux-i686-2.6/desktopcouch/replication_services
copying desktopcouch/replication_services/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/replication_services
copying desktopcouch/replication_services/example.py -> build/lib.linux-i686-2.6/desktopcouch/replication_services
creating build/lib.linux-i686-2.6/desktopcouch/notes
copying desktopcouch/notes/record.py -> build/lib.linux-i686-2.6/desktopcouch/notes
copying desktopcouch/notes/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/notes
creating build/lib.linux-i686-2.6/desktopcouch/bookmarks
copying desktopcouch/bookmarks/record.py -> build/lib.linux-i686-2.6/desktopcouch/bookmarks
copying desktopcouch/bookmarks/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/bookmarks
creating build/lib.linux-i686-2.6/desktopcouch/contacts
copying desktopcouch/contacts/record.py -> build/lib.linux-i686-2.6/desktopcouch/contacts
copying desktopcouch/contacts/view.py -> build/lib.linux-i686-2.6/desktopcouch/contacts
copying desktopcouch/contac...

Revision history for this message
dobey (dobey) wrote :
Download full text (112.7 KiB)

The attempt to merge lp:~vds/desktopcouch/views-with-reconnector-proxy into lp:desktopcouch failed. Below is the output from the failed tests.

running build
running build_py
creating build
creating build/lib.linux-i686-2.6
creating build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/stop_local_couchdb.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/start_local_couchdb.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/replication.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/local_files.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/__init__.py -> build/lib.linux-i686-2.6/desktopcouch
creating build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/test_start_local_couchdb.py -> build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/test_local_files.py -> build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/test_replication.py -> build/lib.linux-i686-2.6/desktopcouch/tests
creating build/lib.linux-i686-2.6/desktopcouch/tasks
copying desktopcouch/tasks/record.py -> build/lib.linux-i686-2.6/desktopcouch/tasks
copying desktopcouch/tasks/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/tasks
creating build/lib.linux-i686-2.6/desktopcouch/pair
copying desktopcouch/pair/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/pair
creating build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/field_registry.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/record.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/server.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/couchgrid.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/server_base.py -> build/lib.linux-i686-2.6/desktopcouch/records
creating build/lib.linux-i686-2.6/desktopcouch/replication_services
copying desktopcouch/replication_services/ubuntuone.py -> build/lib.linux-i686-2.6/desktopcouch/replication_services
copying desktopcouch/replication_services/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/replication_services
copying desktopcouch/replication_services/example.py -> build/lib.linux-i686-2.6/desktopcouch/replication_services
creating build/lib.linux-i686-2.6/desktopcouch/notes
copying desktopcouch/notes/record.py -> build/lib.linux-i686-2.6/desktopcouch/notes
copying desktopcouch/notes/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/notes
creating build/lib.linux-i686-2.6/desktopcouch/bookmarks
copying desktopcouch/bookmarks/record.py -> build/lib.linux-i686-2.6/desktopcouch/bookmarks
copying desktopcouch/bookmarks/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/bookmarks
creating build/lib.linux-i686-2.6/desktopcouch/contacts
copying desktopcouch/contacts/record.py -> build/lib.linux-i686-2.6/desktopcouch/contacts
copying desktopcouch/contacts/view.py -> build/lib.linux-i686-2.6/desktopcouch/contacts
copying desktopcouch/contac...

Revision history for this message
dobey (dobey) wrote :
Download full text (112.3 KiB)

The attempt to merge lp:~vds/desktopcouch/views-with-reconnector-proxy into lp:desktopcouch failed. Below is the output from the failed tests.

running build
running build_py
creating build
creating build/lib.linux-i686-2.6
creating build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/stop_local_couchdb.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/start_local_couchdb.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/replication.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/local_files.py -> build/lib.linux-i686-2.6/desktopcouch
copying desktopcouch/__init__.py -> build/lib.linux-i686-2.6/desktopcouch
creating build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/test_start_local_couchdb.py -> build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/test_local_files.py -> build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/tests
copying desktopcouch/tests/test_replication.py -> build/lib.linux-i686-2.6/desktopcouch/tests
creating build/lib.linux-i686-2.6/desktopcouch/tasks
copying desktopcouch/tasks/record.py -> build/lib.linux-i686-2.6/desktopcouch/tasks
copying desktopcouch/tasks/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/tasks
creating build/lib.linux-i686-2.6/desktopcouch/pair
copying desktopcouch/pair/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/pair
creating build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/field_registry.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/record.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/server.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/couchgrid.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/records
copying desktopcouch/records/server_base.py -> build/lib.linux-i686-2.6/desktopcouch/records
creating build/lib.linux-i686-2.6/desktopcouch/replication_services
copying desktopcouch/replication_services/ubuntuone.py -> build/lib.linux-i686-2.6/desktopcouch/replication_services
copying desktopcouch/replication_services/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/replication_services
copying desktopcouch/replication_services/example.py -> build/lib.linux-i686-2.6/desktopcouch/replication_services
creating build/lib.linux-i686-2.6/desktopcouch/notes
copying desktopcouch/notes/record.py -> build/lib.linux-i686-2.6/desktopcouch/notes
copying desktopcouch/notes/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/notes
creating build/lib.linux-i686-2.6/desktopcouch/bookmarks
copying desktopcouch/bookmarks/record.py -> build/lib.linux-i686-2.6/desktopcouch/bookmarks
copying desktopcouch/bookmarks/__init__.py -> build/lib.linux-i686-2.6/desktopcouch/bookmarks
creating build/lib.linux-i686-2.6/desktopcouch/contacts
copying desktopcouch/contacts/record.py -> build/lib.linux-i686-2.6/desktopcouch/contacts
copying desktopcouch/contacts/view.py -> build/lib.linux-i686-2.6/desktopcouch/contacts
copying desktopcouch/contac...

183. By Vincenzo Di Somma

fixed issue with keyring

184. By Vincenzo Di Somma

logging when the issue happens

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches