@@ -14,8 +14,9 @@ Test Tags theme:mqtt
14
14
Publish Connection Closed after publish
15
15
[Documentation] Tests that the connection to the MQTT broker is closed after publishing.
16
16
Execute Command /setup/bootstrap.sh
17
+ ${log_start } ThinEdgeIO.Get Unix Timestamp
17
18
Execute Command tedge mqtt pub test/topic Hello
18
- ${MQTT_PUB } Execute Command journalctl -u mosquitto -n 30
19
+ ${MQTT_PUB } Execute Command journalctl -u mosquitto --since "@ ${ log_start } " --no-pager
19
20
Should Contain ${MQTT_PUB } Received DISCONNECT from tedge-pub
20
21
21
22
Publish Connection Closed after publish and no error message with TLS
@@ -24,15 +25,17 @@ Publish Connection Closed after publish and no error message with TLS
24
25
Set up broker with server and client authentication
25
26
tedge configure MQTT server authentication
26
27
tedge configure MQTT client authentication
28
+ ${log_start } ThinEdgeIO.Get Unix Timestamp
27
29
Execute Command tedge mqtt pub test/topic Hello
28
- ${MQTT_PUB } Execute Command journalctl -u mosquitto -n 30
30
+ ${MQTT_PUB } Execute Command journalctl -u mosquitto --since "@ ${ log_start } " --no-pager
29
31
Should Contain ${MQTT_PUB } Received DISCONNECT from tedge-pub
30
32
31
33
Subscribe Connection Closed On Interruption
32
34
[Documentation] Tests that a subscribe connection to MQTT broker closes upon interruption.
33
35
Execute Command /setup/bootstrap.sh
36
+ ${log_start } ThinEdgeIO.Get Unix Timestamp
34
37
Execute Command timeout 2 tedge mqtt sub test/topic ignore_exit_code=True
35
- ${MQTT_SUB } Execute Command journalctl -u mosquitto -n 30
38
+ ${MQTT_SUB } Execute Command journalctl -u mosquitto --since "@ ${ log_start } " --no-pager
36
39
Should Contain ${MQTT_SUB } Received DISCONNECT from tedge-sub
37
40
38
41
Stop subscription on SIGINT even when broker is not available
0 commit comments