Merge lp:~dobey/ubuntuone-client/getmetadata-fullpath into lp:ubuntuone-client

Proposed by dobey
Status: Merged
Approved by: Natalia Bidart
Approved revision: 296
Merged at revision: not available
Proposed branch: lp:~dobey/ubuntuone-client/getmetadata-fullpath
Merge into: lp:ubuntuone-client
Diff against target: 44 lines (+4/-3)
3 files modified
tests/syncdaemon/test_dbus.py (+2/-2)
tests/syncdaemon/test_tools.py (+1/-1)
ubuntuone/syncdaemon/dbus_interface.py (+1/-0)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/getmetadata-fullpath
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Guillermo Gonzalez Approve
Review via email: mp+16340@code.launchpad.net

Commit message

Return the full path in the dict for get_metadata

To post a comment you must log in.
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

I'm getting this failures:

===============================================================================
[FAIL]: tests.syncdaemon.test_tools.TestToolsBasic.test_get_metadata

Traceback (most recent call last):
  File "/opt/canonical/ubuntuone-client/review/tests/syncdaemon/test_tools.py", line 141, in callback
    self.assertEquals('foo', str(result['path']))
twisted.trial.unittest.FailTest: not equal:
a = 'foo'
b = '/opt/canonical/ubuntuone-client/review/_trial_temp/tmp/tests.syncdaemon.test_tools/TestToolsBasic/test_get_metadata/tmpdir/root_dir/foo'

===============================================================================
[FAIL]: tests.oauthdesktop.test_auth.AuthorisationClientTests.test_ensure_access_token_no_token

Traceback (most recent call last):
  File "/usr/lib/python2.6/unittest.py", line 279, in run
    testMethod()
  File "/opt/canonical/ubuntuone-client/review/contrib/mocker.py", line 117, in test_method_wrapper
    self.mocker.verify()
  File "/opt/canonical/ubuntuone-client/review/contrib/mocker.py", line 504, in verify
    raise AssertionError(os.linesep.join(message))
exceptions.AssertionError: [Mocker] Unmet expectations:

=> open_in_browser(ANY)
 - Performed fewer times than expected.

-------------------------------------------------------------------------------
Ran 4505 tests in 86.061s

review: Needs Fixing
296. By dobey

Fix the test_tools check as well

Revision history for this message
Guillermo Gonzalez (verterok) :
review: Approve
Revision history for this message
Natalia Bidart (nataliabidart) wrote :
Download full text (8.8 KiB)

I'm getting all these:

===============================================================================
[ERROR]: tests.syncdaemon.test_localrescan.InotifyTests.test_man_in_the_middle

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/twisted/internet/gtk2reactor.py", line 199, in _doReadOrWrite
    why = source.doRead()
  File "/home/nessita/canonical/ubuntuone-client/getmetadata-fullpath/ubuntuone/syncdaemon/event_queue.py", line 472, in doRead
    notifier.process_events()
  File "/usr/lib/pymodules/python2.6/pyinotify.py", line 1011, in process_events
    revent = self._sys_proc_fun(raw_event) # system processings
  File "/usr/lib/pymodules/python2.6/pyinotify.py", line 549, in __call__
    return meth(event)
  File "/usr/lib/pymodules/python2.6/pyinotify.py", line 627, in process_IN_CREATE
    return self.process_default(raw_event)
  File "/usr/lib/pymodules/python2.6/pyinotify.py", line 714, in process_default
    'path': watch_.path,
exceptions.AttributeError: 'NoneType' object has no attribute 'path'
===============================================================================
[ERROR]: tests.syncdaemon.test_sync.TestSync.test_deleting_open_files_is_no_cause_for_despair

Traceback (most recent call last):
Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was unclean.
DelayedCalls: (set twisted.internet.base.DelayedCall.debug = True to debug)
<DelayedCall 160258060 [0.896098136902s] called=0 cancelled=0 ActionQueue._resetReadThisSecond()>
<DelayedCall 160581676 [0.896050930023s] called=0 cancelled=0 ActionQueue._resetWrittenThisSecond()>
===============================================================================
[ERROR]: tests.syncdaemon.test_sync.TestSync.test_stomp_deleted_file_is_no_cause_for_despair_either

Traceback (most recent call last):
Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was unclean.
DelayedCalls: (set twisted.internet.base.DelayedCall.debug = True to debug)
<DelayedCall 167980940 [0.897617816925s] called=0 cancelled=0 ActionQueue._resetReadThisSecond()>
<DelayedCall 165070380 [0.897607803345s] called=0 cancelled=0 ActionQueue._resetWrittenThisSecond()>
===============================================================================
[ERROR]: tests.syncdaemon.test_action_queue.AcionQueueTests.test_aq_resolve_uuid_maybe

Traceback (most recent call last):
Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was unclean.
DelayedCalls: (set twisted.internet.base.DelayedCall.debug = True to debug)
<DelayedCall 168868044 [0.940618991852s] called=0 cancelled=0 ActionQueue._resetReadThisSecond()>
<DelayedCall 169389004 [0.940613031387s] called=0 cancelled=0 ActionQueue._resetWrittenThisSecond()>
===============================================================================
[ERROR]: tests.syncdaemon.test_action_queue.AcionQueueTests.test_content_queue_has_only_one_op_per_node

Traceback (most recent call last):
Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was unclean.
DelayedCalls: (set twisted.internet.base.DelayedCall.debug = True to debug)
<DelayedCall 175655532 [0.943639039993s] called=0 cancelled=0 ActionQueue._resetReadThisSeco...

Read more...

review: Needs Fixing
Revision history for this message
dobey (dobey) wrote :

The errors you got are unrelated. Looks like maybe something is going on
with the reactor in the tests on your machine? Have you tried in another
clean checkout as well?

On Fri, 2009-12-18 at 22:34 +0000, Naty Bidart wrote:
> Review: Needs Fixing
> I'm getting all these:

> FAILED (errors=15, successes=4490)
> make: *** [check] Error 1
>
> I've tried two times making make clean and then make check. Any ideas?

Revision history for this message
Natalia Bidart (nataliabidart) wrote :
Download full text (9.3 KiB)

> I'm getting all these:
>
> ==============================================================================
> =
> [ERROR]: tests.syncdaemon.test_localrescan.InotifyTests.test_man_in_the_middle
>
> Traceback (most recent call last):
> File "/usr/lib/python2.6/dist-packages/twisted/internet/gtk2reactor.py",
> line 199, in _doReadOrWrite
> why = source.doRead()
> File "/home/nessita/canonical/ubuntuone-client/getmetadata-
> fullpath/ubuntuone/syncdaemon/event_queue.py", line 472, in doRead
> notifier.process_events()
> File "/usr/lib/pymodules/python2.6/pyinotify.py", line 1011, in
> process_events
> revent = self._sys_proc_fun(raw_event) # system processings
> File "/usr/lib/pymodules/python2.6/pyinotify.py", line 549, in __call__
> return meth(event)
> File "/usr/lib/pymodules/python2.6/pyinotify.py", line 627, in
> process_IN_CREATE
> return self.process_default(raw_event)
> File "/usr/lib/pymodules/python2.6/pyinotify.py", line 714, in
> process_default
> 'path': watch_.path,
> exceptions.AttributeError: 'NoneType' object has no attribute 'path'
> ==============================================================================
> =
> [ERROR]: tests.syncdaemon.test_sync.TestSync.test_deleting_open_files_is_no_ca
> use_for_despair
>
> Traceback (most recent call last):
> Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was unclean.
> DelayedCalls: (set twisted.internet.base.DelayedCall.debug = True to debug)
> <DelayedCall 160258060 [0.896098136902s] called=0 cancelled=0
> ActionQueue._resetReadThisSecond()>
> <DelayedCall 160581676 [0.896050930023s] called=0 cancelled=0
> ActionQueue._resetWrittenThisSecond()>
> ==============================================================================
> =
> [ERROR]: tests.syncdaemon.test_sync.TestSync.test_stomp_deleted_file_is_no_cau
> se_for_despair_either
>
> Traceback (most recent call last):
> Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was unclean.
> DelayedCalls: (set twisted.internet.base.DelayedCall.debug = True to debug)
> <DelayedCall 167980940 [0.897617816925s] called=0 cancelled=0
> ActionQueue._resetReadThisSecond()>
> <DelayedCall 165070380 [0.897607803345s] called=0 cancelled=0
> ActionQueue._resetWrittenThisSecond()>
> ==============================================================================
> =
> [ERROR]:
> tests.syncdaemon.test_action_queue.AcionQueueTests.test_aq_resolve_uuid_maybe
>
> Traceback (most recent call last):
> Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was unclean.
> DelayedCalls: (set twisted.internet.base.DelayedCall.debug = True to debug)
> <DelayedCall 168868044 [0.940618991852s] called=0 cancelled=0
> ActionQueue._resetReadThisSecond()>
> <DelayedCall 169389004 [0.940613031387s] called=0 cancelled=0
> ActionQueue._resetWrittenThisSecond()>
> ==============================================================================
> =
> [ERROR]: tests.syncdaemon.test_action_queue.AcionQueueTests.test_content_queue
> _has_only_one_op_per_node
>
> Traceback (most recent call last):
> Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was unclean.
> DelayedCalls: (set tw...

Read more...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/syncdaemon/test_dbus.py'
2--- tests/syncdaemon/test_dbus.py 2009-12-16 19:38:05 +0000
3+++ tests/syncdaemon/test_dbus.py 2009-12-18 18:55:23 +0000
4@@ -128,7 +128,7 @@
5
6 def callback(result):
7 """ callback to check the result. """
8- self.assertEquals('foo', str(result['path']))
9+ self.assertEquals(path, str(result['path']))
10 self.assertEquals('share', result['share_id'])
11 self.assertEquals('node_id', result['node_id'])
12
13@@ -736,7 +736,7 @@
14
15 def callback(result):
16 """ callback to check the result. """
17- self.assertEquals(u'\xf1o\xf1o', unicode(result['path']))
18+ self.assertEquals(path, unicode(result['path']))
19 self.assertEquals('share', result['share_id'])
20 self.assertEquals('node_id', result['node_id'])
21
22
23=== modified file 'tests/syncdaemon/test_tools.py'
24--- tests/syncdaemon/test_tools.py 2009-12-16 15:56:01 +0000
25+++ tests/syncdaemon/test_tools.py 2009-12-18 18:55:23 +0000
26@@ -138,7 +138,7 @@
27 d = self.tool.get_metadata(path)
28 # the callback, pylint: disable-msg=C0111
29 def callback(result):
30- self.assertEquals('foo', str(result['path']))
31+ self.assertEquals(path, str(result['path']))
32 self.assertEquals('', str(result['share_id']))
33 self.assertEquals('node_id', result['node_id'])
34 d.addCallback(callback)
35
36=== modified file 'ubuntuone/syncdaemon/dbus_interface.py'
37--- ubuntuone/syncdaemon/dbus_interface.py 2009-12-16 20:31:49 +0000
38+++ ubuntuone/syncdaemon/dbus_interface.py 2009-12-18 18:55:23 +0000
39@@ -672,6 +672,7 @@
40 if mdobj.__dict__.get('info', None):
41 for k, v in mdobj.info.__dict__.items():
42 md_dict['info_'+str(k)] = str(v)
43+ md_dict['path'] = path
44 return md_dict
45
46

Subscribers

People subscribed via source and target branches