Merge lp:~lukas-kde/ubuntu-ui-toolkit/asyncDbusClipboard into lp:ubuntu-ui-toolkit/staging
| Status: | Merged |
|---|---|
| Approved by: | Christian Dywan on 2017-02-12 |
| Approved revision: | 2172 |
| Merged at revision: | 2170 |
| Proposed branch: | lp:~lukas-kde/ubuntu-ui-toolkit/asyncDbusClipboard |
| Merge into: | lp:ubuntu-ui-toolkit/staging |
| Diff against target: |
323 lines (+79/-81) 3 files modified
src/UbuntuToolkit/privates/uccontenthub.cpp (+45/-45) src/UbuntuToolkit/privates/uccontenthub_p.h (+17/-14) tests/unit/contenthub/tst_contenthub.cpp (+17/-22) |
| To merge this branch: | bzr merge lp:~lukas-kde/ubuntu-ui-toolkit/asyncDbusClipboard |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| ubuntu-sdk-build-bot | continuous-integration | Approve on 2017-02-12 | |
| Christian Dywan | 2017-02-10 | Approve on 2017-02-12 | |
| Arthur Mello (community) | 2017-02-10 | Approve on 2017-02-10 | |
|
Review via email:
|
|||
Commit Message
Unbreak the startup race between unity8/qtmir and UITK trying talk to content-hub
Description of the Change
Unbreak the startup race between unity8/qtmir and UITK trying talk to content-hub
Do not initialize the UCContentHub class until the content hub service becomes available on DBUS; make the onPasteboardCha
Fixes lp:1663106 - [regression] Logging in to Unity8 takes 25 seconds (the default DBus timeout)
| Christian Dywan (kalikiana) wrote : | # |
FAILED: Continuous integration, rev:2170
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2170
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2170
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2170
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:2170
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
| Arthur Mello (artmello) wrote : | # |
Changes looks good to me. Thx for working on that.
- 2171. By Lukáš Tinkl on 2017-02-10
-
if content-hub is already running, go and init directly
- 2172. By Lukáš Tinkl on 2017-02-10
-
fix the tests
do not wait needlessly, QTRY_COMPARE() already has a 5 second timeout
PASSED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2172
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/

Notes from discussing this on IRC:
<ltinkl> unity8/qtmir is starting up, we have a TextField somewhere in our GUI which contains the call to UCContentHub, calls content-hub over DBUS, but at the same time content-hub is asking qtmir for authorization
I assume content-hub somehow also queries the clipboard, but the implementation of QPlatformClipboard is in qtmir :) so we get a nice circular dependency and DBUS gets stuck, until one of the calls times out
he tricky (blocking) part is creating QDBusInterface in your CTOR, you don't even have to make any calls
<kalikiana> How about making the mock service sleep when it initializes or responds?
Maybe the mock service should actually just time out the first call?