Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
8065504b
Commit
8065504b
authored
1 year ago
by
Sébastien Blin
Committed by
Adrien Béraud
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
tests: fix testAddAcceptOfflineThenConnects
Change-Id: I0e0248d167af0e81cef828ef3c1e3746d974aaed
parent
df918256
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/unitTest/conversation/conversationMembersEvent.cpp
+11
-0
11 additions, 0 deletions
test/unitTest/conversation/conversationMembersEvent.cpp
with
11 additions
and
0 deletions
test/unitTest/conversation/conversationMembersEvent.cpp
+
11
−
0
View file @
8065504b
...
@@ -584,12 +584,23 @@ ConversationMembersEventTest::testAddAcceptOfflineThenConnects()
...
@@ -584,12 +584,23 @@ ConversationMembersEventTest::testAddAcceptOfflineThenConnects()
requestReceived
=
true
;
requestReceived
=
true
;
cv
.
notify_one
();
cv
.
notify_one
();
}));
}));
bool
aliceStopped
=
false
;
confHandlers
.
insert
(
libjami
::
exportable_callback
<
libjami
::
ConfigurationSignal
::
VolatileDetailsChanged
>
(
[
&
](
const
std
::
string
&
,
const
std
::
map
<
std
::
string
,
std
::
string
>&
)
{
auto
details
=
aliceAccount
->
getVolatileAccountDetails
();
auto
daemonStatus
=
details
[
libjami
::
Account
::
ConfProperties
::
Registration
::
STATUS
];
if
(
daemonStatus
==
"UNREGISTERED"
)
aliceStopped
=
true
;
cv
.
notify_one
();
}));
libjami
::
registerSignalHandlers
(
confHandlers
);
libjami
::
registerSignalHandlers
(
confHandlers
);
libjami
::
addConversationMember
(
aliceId
,
convId
,
bobUri
);
libjami
::
addConversationMember
(
aliceId
,
convId
,
bobUri
);
CPPUNIT_ASSERT
(
cv
.
wait_for
(
lk
,
60s
,
[
&
]
{
return
requestReceived
;
}));
CPPUNIT_ASSERT
(
cv
.
wait_for
(
lk
,
60s
,
[
&
]
{
return
requestReceived
;
}));
Manager
::
instance
().
sendRegister
(
aliceId
,
false
);
// This avoid to sync immediately
Manager
::
instance
().
sendRegister
(
aliceId
,
false
);
// This avoid to sync immediately
CPPUNIT_ASSERT
(
cv
.
wait_for
(
lk
,
60s
,
[
&
]
{
return
aliceStopped
;
}));
libjami
::
acceptConversationRequest
(
bobId
,
convId
);
libjami
::
acceptConversationRequest
(
bobId
,
convId
);
std
::
this_thread
::
sleep_for
(
40s
);
// Wait for negotiation to timeout
std
::
this_thread
::
sleep_for
(
40s
);
// Wait for negotiation to timeout
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment