Merge lp://qastaging/~diegosarmentero/ubuntuone-client/ubuntuone-client-publishapi into lp://qastaging/ubuntuone-client

Proposed by Diego Sarmentero
Status: Merged
Approved by: Diego Sarmentero
Approved revision: 1340
Merged at revision: 1336
Proposed branch: lp://qastaging/~diegosarmentero/ubuntuone-client/ubuntuone-client-publishapi
Merge into: lp://qastaging/ubuntuone-client
Diff against target: 180 lines (+113/-11)
2 files modified
tests/platform/tools/test_tools.py (+98/-6)
ubuntuone/platform/tools/perspective_broker.py (+15/-5)
To merge this branch: bzr merge lp://qastaging/~diegosarmentero/ubuntuone-client/ubuntuone-client-publishapi
Reviewer Review Type Date Requested Status
Manuel de la Peña (community) Approve
Mike McCracken (community) Approve
Review via email: mp+128312@code.qastaging.launchpad.net

Commit message

- Making the handler connection to be a list of handlers (LP: #1061880).

To post a comment you must log in.
Revision history for this message
Mike McCracken (mikemc) wrote :

This is related to this control-panel branch:
https://code.launchpad.net/~diegosarmentero/ubuntuone-control-panel/u1-cp-publishapi/+merge/128316

but in light of that branch, it's not totally clear why we need to change this here.

share_links is the only part of control panel that ever sets signal handlers for the public_files handler and the public_access_changed handler. Is it possible to have multiple invocations of this remote call from control panel? ie, does this happen if we click fast to share two files in the table or something? or is that impossible?

Also, just a note that on IRC I requested a test that shows the problem and breaks with the old code… Diego was working on that at EOD friday…

review: Needs Information
Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

We needed to store a list of handlers to be called, because the setattr is overriding the behaviour of that part of the object every time a connect_signal is requested, and it was happening that several functions were being connected to the same signals, the ones with the handler that we actually want, and some other for clean up at syncdaemon core, and only the last handler connected was the one that was being called.

1335. By Diego Sarmentero

merge

1336. By Diego Sarmentero

improving handler calls

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

73 + self.addCleanup(self.sdtool.shutdown)

Why not adding it after the creation of the sdtool?

review: Needs Fixing
1337. By Diego Sarmentero

improve test

1338. By Diego Sarmentero

fix test

1339. By Diego Sarmentero

adding new test

Revision history for this message
Mike McCracken (mikemc) wrote :

minor - test_connect_avoid_repeated_connection has the same docstring as test_connect_several_handlers_to_same_signal but they test different things

review: Needs Fixing
1340. By Diego Sarmentero

fixed docstring

Revision history for this message
Mike McCracken (mikemc) wrote :

Approve. These new tests pass on OSX*, and testing the share links panel shows no further hangs.

* the whole suite still has a ton of dirty reactor errors though

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

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