Merge lp:~phablet-team/telephony-service/fix_register_service into lp:telephony-service
- fix_register_service
- Merge into trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~phablet-team/telephony-service/fix_register_service |
Merge into: | lp:telephony-service |
Diff against target: |
267 lines (+37/-26) 8 files modified
approver/approverdbus.cpp (+1/-6) handler/handler.cpp (+6/-0) handler/handlerdbus.cpp (+1/-6) handler/texthandler.cpp (+8/-0) indicator/indicatordbus.cpp (+1/-6) libtelephonyservice/channelobserver.cpp (+7/-0) tests/common/mock/mockconnectiondbus.cpp (+4/-6) tests/handler/approver.cpp (+9/-2) |
To merge this branch: | bzr merge lp:~phablet-team/telephony-service/fix_register_service |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
system-apps-ci-bot | continuous-integration | Needs Fixing | |
Ubuntu Phablet Team | Pending | ||
Review via email: mp+304300@code.launchpad.net |
Commit message
Adapt the objects exposed on dbus to the way QtDBus works on Qt 5.6
Description of the change
Adapt the objects exposed on dbus to the way QtDBus works on Qt 5.6
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
- 1202. By Gustavo Pichorim Boiko
-
Add dbus monitor to understand the test failures.
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1202
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 1203. By Gustavo Pichorim Boiko
-
add debug
- 1204. By Gustavo Pichorim Boiko
-
Remove dbus monitor
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1203
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1204
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 1205. By Gustavo Pichorim Boiko
-
Add more debug
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1205
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 1206. By Gustavo Pichorim Boiko
-
More debug
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1205
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 1207. By Gustavo Pichorim Boiko
-
More debug.
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1206
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1207
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unmerged revisions
- 1207. By Gustavo Pichorim Boiko
-
More debug.
- 1206. By Gustavo Pichorim Boiko
-
More debug
- 1205. By Gustavo Pichorim Boiko
-
Add more debug
- 1204. By Gustavo Pichorim Boiko
-
Remove dbus monitor
- 1203. By Gustavo Pichorim Boiko
-
add debug
- 1202. By Gustavo Pichorim Boiko
-
Add dbus monitor to understand the test failures.
- 1201. By Gustavo Pichorim Boiko
-
Adapt the objects exposed on dbus to the way QtDBus works on Qt 5.6
Preview Diff
1 | === modified file 'approver/approverdbus.cpp' |
2 | --- approver/approverdbus.cpp 2015-01-13 13:56:18 +0000 |
3 | +++ approver/approverdbus.cpp 2016-08-30 19:16:41 +0000 |
4 | @@ -40,14 +40,9 @@ |
5 | bool |
6 | ApproverDBus::connectToBus() |
7 | { |
8 | - bool ok = QDBusConnection::sessionBus().registerService(DBUS_SERVICE); |
9 | - if (!ok) { |
10 | - return false; |
11 | - } |
12 | new TelephonyServiceApproverAdaptor(this); |
13 | QDBusConnection::sessionBus().registerObject(DBUS_OBJECT_PATH, this); |
14 | - |
15 | - return true; |
16 | + return QDBusConnection::sessionBus().registerService(DBUS_SERVICE); |
17 | } |
18 | |
19 | void ApproverDBus::HangUpAndAcceptCall() |
20 | |
21 | === modified file 'handler/handler.cpp' |
22 | --- handler/handler.cpp 2015-07-01 22:04:30 +0000 |
23 | +++ handler/handler.cpp 2016-08-30 19:16:41 +0000 |
24 | @@ -54,13 +54,17 @@ |
25 | Q_UNUSED(userActionTime) |
26 | Q_UNUSED(handlerInfo) |
27 | |
28 | + qDebug() << "BLABLA handler handleChannels"; |
29 | + |
30 | if (!ProtocolManager::instance()->isProtocolSupported(account->protocolName())) { |
31 | context->setFinishedWithError(TP_QT_ERROR_NOT_CAPABLE, "The account for this request is not supported."); |
32 | + qDebug() << "BLABLA handler not capable"; |
33 | return; |
34 | } |
35 | |
36 | |
37 | Q_FOREACH(const Tp::ChannelPtr channel, channels) { |
38 | + qDebug() << "BLABLA handler got channel"; |
39 | mContexts[channel.data()] = context; |
40 | Tp::TextChannelPtr textChannel = Tp::TextChannelPtr::dynamicCast(channel); |
41 | if (textChannel) { |
42 | @@ -106,6 +110,7 @@ |
43 | |
44 | void Handler::onTextChannelReady(Tp::PendingOperation *op) |
45 | { |
46 | + qDebug() << "BLABLA handler text channel ready"; |
47 | Tp::PendingReady *pr = qobject_cast<Tp::PendingReady*>(op); |
48 | |
49 | if (!pr) { |
50 | @@ -127,6 +132,7 @@ |
51 | context->setFinished(); |
52 | } |
53 | |
54 | + qDebug() << "BLABLA emitting the signal"; |
55 | Q_EMIT textChannelAvailable(textChannel); |
56 | } |
57 | |
58 | |
59 | === modified file 'handler/handlerdbus.cpp' |
60 | --- handler/handlerdbus.cpp 2015-12-07 16:26:20 +0000 |
61 | +++ handler/handlerdbus.cpp 2016-08-30 19:16:41 +0000 |
62 | @@ -83,14 +83,9 @@ |
63 | |
64 | bool HandlerDBus::connectToBus() |
65 | { |
66 | - bool ok = QDBusConnection::sessionBus().registerService(DBUS_SERVICE); |
67 | - if (!ok) { |
68 | - return false; |
69 | - } |
70 | new TelephonyServiceHandlerAdaptor(this); |
71 | QDBusConnection::sessionBus().registerObject(DBUS_OBJECT_PATH, this); |
72 | - |
73 | - return true; |
74 | + return QDBusConnection::sessionBus().registerService(DBUS_SERVICE); |
75 | } |
76 | |
77 | QString HandlerDBus::SendMessage(const QString &accountId, const QStringList &recipients, const QString &message, const AttachmentList &attachments, const QVariantMap &properties) |
78 | |
79 | === modified file 'handler/texthandler.cpp' |
80 | --- handler/texthandler.cpp 2016-03-01 18:17:57 +0000 |
81 | +++ handler/texthandler.cpp 2016-08-30 19:16:41 +0000 |
82 | @@ -303,8 +303,10 @@ |
83 | |
84 | QString TextHandler::sendMessage(const QString &accountId, const QStringList &recipients, const QString &message, const AttachmentList &attachments, const QVariantMap &properties) |
85 | { |
86 | + qDebug() << "BLABLA send message called"; |
87 | AccountEntry *account = TelepathyHelper::instance()->accountForId(accountId); |
88 | if (!account) { |
89 | + qDebug() << "BLABLA no account"; |
90 | // account does not exist |
91 | return QString(); |
92 | } |
93 | @@ -347,6 +349,7 @@ |
94 | } |
95 | } |
96 | if (shouldFallback) { |
97 | + qDebug() << "BLABLA fallback"; |
98 | account = newAccount; |
99 | break; |
100 | } |
101 | @@ -359,6 +362,7 @@ |
102 | PendingMessage pendingMessage = {account->accountId(), sortedRecipients, message, attachments, properties}; |
103 | |
104 | if (!account->connected()) { |
105 | + qDebug() << "BLABLA account not connected"; |
106 | mPendingMessages.append(pendingMessage); |
107 | return account->accountId(); |
108 | } |
109 | @@ -366,10 +370,13 @@ |
110 | QList<Tp::TextChannelPtr> channels = existingChannels(recipients, account->accountId()); |
111 | if (channels.isEmpty()) { |
112 | mPendingMessages.append(pendingMessage); |
113 | + qDebug() << "BLABLA need to create a new channel"; |
114 | startChat(sortedRecipients, account->accountId()); |
115 | return account->accountId(); |
116 | } |
117 | |
118 | + qDebug() << "BLABLA sending via existing channel"; |
119 | + |
120 | connect(channels.last()->send(buildMessage(pendingMessage)), |
121 | SIGNAL(finished(Tp::PendingOperation*)), |
122 | SLOT(onMessageSent(Tp::PendingOperation*))); |
123 | @@ -419,6 +426,7 @@ |
124 | |
125 | void TextHandler::onTextChannelAvailable(Tp::TextChannelPtr channel) |
126 | { |
127 | + qDebug() << "BLABLA text channel available"; |
128 | AccountEntry *account = TelepathyHelper::instance()->accountForConnection(channel->connection()); |
129 | if (!account) { |
130 | return; |
131 | |
132 | === modified file 'indicator/indicatordbus.cpp' |
133 | --- indicator/indicatordbus.cpp 2015-05-19 18:34:06 +0000 |
134 | +++ indicator/indicatordbus.cpp 2016-08-30 19:16:41 +0000 |
135 | @@ -43,14 +43,9 @@ |
136 | bool |
137 | IndicatorDBus::connectToBus() |
138 | { |
139 | - bool ok = QDBusConnection::sessionBus().registerService(DBUS_SERVICE); |
140 | - if (!ok) { |
141 | - return false; |
142 | - } |
143 | new TelephonyServiceIndicatorAdaptor(this); |
144 | QDBusConnection::sessionBus().registerObject(DBUS_OBJECT_PATH, this); |
145 | - |
146 | - return true; |
147 | + return QDBusConnection::sessionBus().registerService(DBUS_SERVICE); |
148 | } |
149 | |
150 | void IndicatorDBus::ClearNotifications() |
151 | |
152 | === modified file 'libtelephonyservice/channelobserver.cpp' |
153 | --- libtelephonyservice/channelobserver.cpp 2015-06-10 21:05:50 +0000 |
154 | +++ libtelephonyservice/channelobserver.cpp 2016-08-30 19:16:41 +0000 |
155 | @@ -30,6 +30,7 @@ |
156 | ChannelObserver::ChannelObserver(QObject *parent) : |
157 | QObject(parent), Tp::AbstractClientObserver(channelFilters(), true) |
158 | { |
159 | + qDebug() << "BLABLA channelObserver created"; |
160 | } |
161 | |
162 | Tp::ChannelClassSpecList ChannelObserver::channelFilters() const |
163 | @@ -57,8 +58,11 @@ |
164 | Q_UNUSED(requestsSatisfied) |
165 | Q_UNUSED(observerInfo) |
166 | |
167 | + qDebug() << "BLABLA channelObserver observeChannels"; |
168 | + |
169 | if (!ProtocolManager::instance()->isProtocolSupported(account->protocolName())) { |
170 | context->setFinishedWithError(TP_QT_ERROR_NOT_CAPABLE, "The account for this request is not supported."); |
171 | + qDebug() << "BLABLA channelObserver not capable"; |
172 | return; |
173 | } |
174 | |
175 | @@ -98,6 +102,7 @@ |
176 | mReadyMap[ready] = textChannel; |
177 | } |
178 | } |
179 | + qDebug() << "BLABLA channelObserver exitting observeChannels, context might not be finished yet"; |
180 | } |
181 | |
182 | void ChannelObserver::onCallChannelReady(Tp::PendingOperation *op) |
183 | @@ -166,6 +171,7 @@ |
184 | |
185 | void ChannelObserver::checkContextFinished(Tp::Channel *channel) |
186 | { |
187 | + qDebug() << "BLABLA channelObserver checking contexs"; |
188 | if (!mContexts.contains(channel)) { |
189 | qWarning() << "Context for channel not available:" << channel; |
190 | return; |
191 | @@ -183,5 +189,6 @@ |
192 | } |
193 | } |
194 | |
195 | + qDebug() << "BLABLA channelObserver setting context as finished"; |
196 | context->setFinished(); |
197 | } |
198 | |
199 | === modified file 'tests/common/mock/mockconnectiondbus.cpp' |
200 | --- tests/common/mock/mockconnectiondbus.cpp 2016-03-31 19:29:44 +0000 |
201 | +++ tests/common/mock/mockconnectiondbus.cpp 2016-08-30 19:16:41 +0000 |
202 | @@ -79,16 +79,14 @@ |
203 | |
204 | bool MockConnectionDBus::connectToBus() |
205 | { |
206 | - bool ok = QDBusConnection::sessionBus().registerService("com.canonical.MockConnection"); |
207 | - if (!ok) { |
208 | - return false; |
209 | - } |
210 | - |
211 | if (!mAdaptor) { |
212 | mAdaptor = new MockConnectionAdaptor(this); |
213 | } |
214 | |
215 | - return QDBusConnection::sessionBus().registerObject(mObjectPath, this); |
216 | + if (!QDBusConnection::sessionBus().registerObject(mObjectPath, this)) { |
217 | + return false; |
218 | + } |
219 | + return QDBusConnection::sessionBus().registerService("com.canonical.MockConnection"); |
220 | } |
221 | |
222 | void MockConnectionDBus::PlaceIncomingMessage(const QString &message, const QVariantMap &properties) |
223 | |
224 | === modified file 'tests/handler/approver.cpp' |
225 | --- tests/handler/approver.cpp 2015-07-02 00:07:05 +0000 |
226 | +++ tests/handler/approver.cpp 2016-08-30 19:16:41 +0000 |
227 | @@ -48,6 +48,8 @@ |
228 | { |
229 | bool willHandle = false; |
230 | |
231 | + qDebug() << "BLABLA test approver got channel"; |
232 | + |
233 | QList<Tp::ChannelPtr> channels = dispatchOperation->channels(); |
234 | Q_FOREACH (Tp::ChannelPtr channel, channels) { |
235 | // Text Channel |
236 | @@ -77,13 +79,14 @@ |
237 | } |
238 | |
239 | if (willHandle) { |
240 | + qDebug() << "BLABLA test approver will handle channels"; |
241 | mDispatchOps.append(dispatchOperation); |
242 | } |
243 | |
244 | - context->setFinished(); |
245 | - |
246 | // check if we need to approve channels already or if we should wait. |
247 | processChannels(); |
248 | + |
249 | + context->setFinished(); |
250 | } |
251 | |
252 | void Approver::processChannels() |
253 | @@ -94,10 +97,14 @@ |
254 | // approve only text channels |
255 | Tp::TextChannelPtr textChannel = Tp::TextChannelPtr::dynamicCast(channel); |
256 | if (textChannel.isNull()) { |
257 | + qDebug() << "BLABLA test approver not a text channel"; |
258 | continue; |
259 | } |
260 | |
261 | + qDebug() << "BLABLA test approver possible handlers:" << dispatchOperation->possibleHandlers(); |
262 | + |
263 | if (dispatchOperation->possibleHandlers().contains(TELEPHONY_SERVICE_HANDLER)) { |
264 | + qDebug() << "BLABLA test approver, ok handling with telephony-service-handler"; |
265 | dispatchOperation->handleWith(TELEPHONY_SERVICE_HANDLER); |
266 | mDispatchOps.removeAll(dispatchOperation); |
267 | } |
FAILED: Continuous integration, rev:1201 /jenkins. canonical. com/system- apps/job/ lp-telephony- service- ci/43/ /jenkins. canonical. com/system- apps/job/ build/1352/ console /jenkins. canonical. com/system- apps/job/ build-0- fetch/1352 /jenkins. canonical. com/system- apps/job/ build-1- sourcepkg/ release= vivid+overlay/ 1213 /jenkins. canonical. com/system- apps/job/ build-1- sourcepkg/ release= xenial+ overlay/ 1213 /jenkins. canonical. com/system- apps/job/ build-1- sourcepkg/ release= yakkety/ 1213 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1193 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1193/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1193 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1193/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 1193/console /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1193 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1193/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1193 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1193/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 1193/console /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1193 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1193/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1193/console /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= yakkety/ 1193/console
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/system- apps/job/ lp-telephony- service- ci/43/rebuild
https:/