Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eclipse
paho.mqtt.c
Commits
b07dee3b
Commit
b07dee3b
authored
Jun 07, 2018
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test10 updates
parent
da1d92bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
test10.c
test/test10.c
+16
-2
No files found.
test/test10.c
View file @
b07dee3b
...
...
@@ -344,7 +344,7 @@ struct aa
void
disconnected
(
void
*
context
,
MQTTProperties
*
props
,
enum
MQTTReasonCodes
rc
)
{
MQTTClient
c
=
(
MQTTClient
)
context
;
printf
(
"Callback: disconnected, reason code
\"
%s
\"\n
"
,
MQTTReasonCodeString
(
rc
));
MyLog
(
LOGA_INFO
,
"Callback: disconnected, reason code
\"
%s
\"
"
,
MQTTReasonCodeString
(
rc
));
logProperties
(
props
);
test_topic_aliases_globals
.
disconnected
=
1
;
}
...
...
@@ -548,6 +548,7 @@ int test_client_topic_aliases(struct Options options)
assert
(
"1 message should have arrived"
,
messages_arrived
==
1
,
"was %d"
,
messages_arrived
);
/* now publish to the topic alias only */
test_topic_aliases_globals
.
disconnected
=
0
;
messages_arrived
=
0
;
property
.
identifier
=
TOPIC_ALIAS
;
property
.
value
.
integer2
=
1
;
...
...
@@ -566,6 +567,19 @@ int test_client_topic_aliases(struct Options options)
}
assert
(
"No message should have arrived"
,
messages_arrived
==
0
,
"was %d"
,
messages_arrived
);
/* Now we expect to receive a disconnect packet telling us why */
count
=
0
;
while
(
test_topic_aliases_globals
.
disconnected
==
0
&&
++
count
<
10
)
{
#if defined(WIN32)
Sleep
(
1000
);
#else
usleep
(
1000000L
);
#endif
}
assert
(
"Disconnected should be called"
,
test_topic_aliases_globals
.
disconnected
==
1
,
"was %d"
,
test_topic_aliases_globals
.
disconnected
);
MQTTProperties_free
(
&
pubmsg
.
properties
);
MQTTProperties_free
(
&
props
);
MQTTProperties_free
(
&
connect_props
);
...
...
@@ -589,7 +603,7 @@ int main(int argc, char** argv)
fprintf
(
xml
,
"<testsuite name=
\"
test1
\"
tests=
\"
%d
\"
>
\n
"
,
(
int
)(
ARRAY_SIZE
(
tests
)
-
1
));
setenv
(
"MQTT_C_CLIENT_TRACE"
,
"ON"
,
1
);
//
setenv("MQTT_C_CLIENT_TRACE_LEVEL", "ERROR", 1);
setenv
(
"MQTT_C_CLIENT_TRACE_LEVEL"
,
"ERROR"
,
1
);
getopts
(
argc
,
argv
);
...
...
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