Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
19323959
Commit
19323959
authored
Oct 15, 2020
by
Simon Morlat
Browse files
Improve tests.
Fix test.
parent
27fb1f5d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
18 deletions
+19
-18
tester/audio_video_conference_tester.c
tester/audio_video_conference_tester.c
+7
-7
tester/conference-event-tester.cpp
tester/conference-event-tester.cpp
+2
-2
tester/liblinphone_tester.c
tester/liblinphone_tester.c
+1
-0
tester/rcfiles/marie_dual_proxy_2_rc
tester/rcfiles/marie_dual_proxy_2_rc
+2
-2
tester/tester.c
tester/tester.c
+7
-7
No files found.
tester/audio_video_conference_tester.c
View file @
19323959
...
...
@@ -333,10 +333,10 @@ static void simple_conference_not_converted_to_call(void) {
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
marie
->
stat
.
number_of_LinphoneConferenceStateCreated
,
1
,
5000
));
// Check subscriptions
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
pauline
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,
1
,
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
michelle
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,
1
,
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
laure
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,
1
,
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
marie
->
stat
.
number_of_LinphoneSubscriptionIncomingReceived
,
3
,
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
pauline
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,
1
,
5
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
michelle
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,
1
,
5
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
laure
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,
1
,
5
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
marie
->
stat
.
number_of_LinphoneSubscriptionIncomingReceived
,
3
,
5
000
));
int
*
subscription_count
=
((
int
*
)(
marie
->
user_info
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
subscription_count
,
3
,
5000
));
...
...
@@ -524,9 +524,9 @@ static void _simple_conference_from_scratch(bool_t with_video){
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
marie
->
stat
.
number_of_LinphoneConferenceStateCreated
,
1
,
5000
));
// Check subscriptions
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
pauline
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,
1
,
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
laure
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,
1
,
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
marie
->
stat
.
number_of_LinphoneSubscriptionIncomingReceived
,
2
,
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
pauline
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,
1
,
5
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
laure
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,
1
,
5
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
marie
->
stat
.
number_of_LinphoneSubscriptionIncomingReceived
,
2
,
5
000
));
int
*
subscription_count
=
((
int
*
)(
marie
->
user_info
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
subscription_count
,
2
,
5000
));
...
...
tester/conference-event-tester.cpp
View file @
19323959
...
...
@@ -1195,8 +1195,8 @@ static LinphoneCall * add_participant_to_conference_through_call(bctbx_list_t **
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
participant_mgr
->
stat
.
number_of_LinphoneCallStreamsRunning
,(
initial_participant_stats
.
number_of_LinphoneCallStreamsRunning
+
2
+
(
pause_call
)
?
1
:
0
),
5000
));
// Check subscriptions
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
participant_mgr
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,(
initial_participant_stats
.
number_of_LinphoneSubscriptionOutgoingProgress
+
1
),
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
conf_mgr
->
stat
.
number_of_LinphoneSubscriptionIncomingReceived
,(
initial_conf_stats
.
number_of_LinphoneSubscriptionIncomingReceived
+
1
),
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
participant_mgr
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,(
initial_participant_stats
.
number_of_LinphoneSubscriptionOutgoingProgress
+
1
),
5
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
conf_mgr
->
stat
.
number_of_LinphoneSubscriptionIncomingReceived
,(
initial_conf_stats
.
number_of_LinphoneSubscriptionIncomingReceived
+
1
),
5
000
));
int
*
subscription_count
=
((
int
*
)(
conf_mgr
->
user_info
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
subscription_count
,(
init_subscription_count
+
1
),
5000
));
...
...
tester/liblinphone_tester.c
View file @
19323959
...
...
@@ -65,6 +65,7 @@ static bctbx_list_t *liblinphone_tester_resolve_name_to_ip_address(const char *n
}
ret
=
bctbx_list_append
(
ret
,
bctbx_strdup
(
ipaddress
));
}
freeaddrinfo
(
ai
);
return
ret
;
}
...
...
tester/rcfiles/marie_dual_proxy_2_rc
View file @
19323959
...
...
@@ -14,8 +14,8 @@ passwd=secret
realm=sip.example.org
[proxy_0]
reg_proxy=<sip:sip.example.org
:6666
;transport=tcp>
reg_route=<sip:sip.example.org
:6666
;transport=tcp>
reg_proxy=<sip:sip.example.org;transport=tcp>
reg_route=<sip:sip.example.org;transport=tcp>
reg_identity="Super Marie" <sip:marie@sip.example.org>
reg_expires=3600
reg_sendregister=1
...
...
tester/tester.c
View file @
19323959
...
...
@@ -624,8 +624,8 @@ LinphoneStatus accept_call_in_local_conference(bctbx_list_t *lcs, LinphoneCoreMa
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
participant_mgr
->
stat
.
number_of_LinphoneConferenceStateCreated
,
1
,
5000
));
// Check subscriptions
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
participant_mgr
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,(
participant_initial_stats
.
number_of_LinphoneSubscriptionOutgoingProgress
+
1
),
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
conf_mgr
->
stat
.
number_of_LinphoneSubscriptionIncomingReceived
,(
conf_initial_stats
.
number_of_LinphoneSubscriptionIncomingReceived
+
1
),
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
participant_mgr
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,(
participant_initial_stats
.
number_of_LinphoneSubscriptionOutgoingProgress
+
1
),
5
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
conf_mgr
->
stat
.
number_of_LinphoneSubscriptionIncomingReceived
,(
conf_initial_stats
.
number_of_LinphoneSubscriptionIncomingReceived
+
1
),
5
000
));
int
*
subscription_count
=
((
int
*
)(
conf_mgr
->
user_info
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
subscription_count
,(
init_subscription_count
+
1
),
5000
));
...
...
@@ -686,10 +686,10 @@ static void check_participant_added_to_conference(bctbx_list_t *lcs, LinphoneCor
bool_t
event_log_enabled
=
linphone_config_get_bool
(
linphone_core_get_config
(
m
->
lc
),
"misc"
,
"conference_event_log_enabled"
,
TRUE
);
if
(
event_log_enabled
)
{
// Check subscriptions
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
m
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,(
new_participant_initial_stats
[
idx
].
number_of_LinphoneSubscriptionOutgoingProgress
+
1
),
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
conf_mgr
->
stat
.
number_of_LinphoneSubscriptionIncomingReceived
,(
conf_initial_stats
.
number_of_LinphoneSubscriptionIncomingReceived
+
idx
-
no_participants_without_event_log
+
1
),
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
m
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,(
new_participant_initial_stats
[
idx
].
number_of_LinphoneSubscriptionOutgoingProgress
+
1
),
5
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
conf_mgr
->
stat
.
number_of_LinphoneSubscriptionIncomingReceived
,(
conf_initial_stats
.
number_of_LinphoneSubscriptionIncomingReceived
+
idx
-
no_participants_without_event_log
+
1
),
5
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
m
->
stat
.
number_of_LinphoneSubscriptionActive
,
new_participant_initial_stats
[
idx
].
number_of_LinphoneSubscriptionActive
+
1
,
3000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
conf_mgr
->
stat
.
number_of_LinphoneSubscriptionActive
,(
conf_initial_stats
.
number_of_LinphoneSubscriptionActive
+
idx
+
1
),
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
conf_mgr
->
stat
.
number_of_LinphoneSubscriptionActive
,(
conf_initial_stats
.
number_of_LinphoneSubscriptionActive
+
idx
+
1
),
5
000
));
}
else
{
no_participants_without_event_log
++
;
}
...
...
@@ -770,7 +770,7 @@ ms_message("%s - conf_to_focus_call %p\n", __func__, conf_to_focus_call);
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
m
->
stat
.
number_of_LinphoneConferenceStateCreationPending
,
initial_stats
.
number_of_LinphoneConferenceStateCreationPending
+
1
,
5000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
m
->
stat
.
number_of_LinphoneConferenceStateCreated
,
initial_stats
.
number_of_LinphoneConferenceStateCreated
+
1
,
5000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
m
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,(
initial_stats
.
number_of_LinphoneSubscriptionOutgoingProgress
+
1
),
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
m
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,(
initial_stats
.
number_of_LinphoneSubscriptionOutgoingProgress
+
1
),
5
000
));
// BC_ASSERT_TRUE(wait_for_list(lcs,&focus_mgr->stat.number_of_LinphoneSubscriptionIncomingReceived,(focus_initial_stats.number_of_LinphoneSubscriptionIncomingReceived + counter),1000));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
m
->
stat
.
number_of_LinphoneSubscriptionActive
,
initial_stats
.
number_of_LinphoneSubscriptionActive
+
1
,
3000
));
...
...
@@ -804,7 +804,7 @@ ms_message("%s - conf_to_focus_call %p\n", __func__, conf_to_focus_call);
// Remote conference
if
(
conf_to_focus_call
==
NULL
)
{
// Asserts to verify that call between focus and confernece manager is correctly set up
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
conf_mgr
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,(
conf_initial_stats
.
number_of_LinphoneSubscriptionOutgoingProgress
+
1
),
1
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
conf_mgr
->
stat
.
number_of_LinphoneSubscriptionOutgoingProgress
,(
conf_initial_stats
.
number_of_LinphoneSubscriptionOutgoingProgress
+
1
),
5
000
));
// BC_ASSERT_TRUE(wait_for_list(lcs,&focus_mgr->stat.number_of_LinphoneSubscriptionIncomingReceived,(focus_initial_stats.number_of_LinphoneSubscriptionIncomingReceived + counter + 1),1000));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
focus_mgr
->
stat
.
number_of_LinphoneConferenceStateCreationPending
,
focus_initial_stats
.
number_of_LinphoneConferenceStateCreationPending
+
1
,
5000
));
BC_ASSERT_TRUE
(
wait_for_list
(
lcs
,
&
focus_mgr
->
stat
.
number_of_LinphoneConferenceStateCreated
,
focus_initial_stats
.
number_of_LinphoneConferenceStateCreated
+
1
,
5000
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment