mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-23 00:24:47 +08:00
Fixed race condition in test/broker/11-persistent-subscription-no-local.py
This commit is contained in:
committed by
Roger A. Light
parent
6c1bb33e86
commit
71e1b92564
@@ -52,7 +52,7 @@ if os.path.exists('mosquitto-%d.db' % (port)):
|
||||
|
||||
broker = mosq_test.start_broker(filename=os.path.basename(__file__), use_conf=True, port=port)
|
||||
|
||||
(stdo1, stde1) = ("", "")
|
||||
(stdo1, stde1) = (None, None)
|
||||
try:
|
||||
sock = mosq_test.do_client_connect(connect_packet, connack_packet, timeout=20, port=port)
|
||||
mosq_test.do_send_receive(sock, subscribe1_packet, suback1_packet, "suback1")
|
||||
@@ -64,6 +64,9 @@ try:
|
||||
|
||||
sock.send(puback2a_packet)
|
||||
|
||||
# Send a ping and wait for the the response to make sure the puback2a_packet was processed by the broker
|
||||
mosq_test.do_ping(sock)
|
||||
|
||||
broker.terminate()
|
||||
broker.wait()
|
||||
(stdo1, stde1) = broker.communicate()
|
||||
@@ -84,6 +87,9 @@ except mosq_test.TestError:
|
||||
pass
|
||||
finally:
|
||||
os.remove(conf_file)
|
||||
if rc and stde1:
|
||||
print(stde1.decode('utf-8'))
|
||||
|
||||
broker.terminate()
|
||||
broker.wait()
|
||||
(stdo, stde) = broker.communicate()
|
||||
|
||||
Reference in New Issue
Block a user