mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
CI: fix pattern in test case test_examples_protocol_mqtt5
This commit is contained in:
parent
677e2fb19a
commit
4af4edc3da
@ -26,24 +26,24 @@ def test_examples_protocol_mqtt5(dut: Dut) -> None:
|
||||
# check if connected or not
|
||||
dut.expect_exact('MQTT_EVENT_CONNECTED', timeout=30)
|
||||
# check log
|
||||
res = dut.expect(r'sent publish successful, msg_id=(\d+)')
|
||||
res = dut.expect(r'sent publish successful, msg_id=(\d+)[^\d]')
|
||||
msgid_pub1 = res.group(1).decode('utf8')
|
||||
res = dut.expect(r'sent subscribe successful, msg_id=(\d+)')
|
||||
res = dut.expect(r'sent subscribe successful, msg_id=(\d+)[^\d]')
|
||||
msgid_sub1 = res.group(1).decode('utf8')
|
||||
res = dut.expect(r'sent subscribe successful, msg_id=(\d+)')
|
||||
res = dut.expect(r'sent subscribe successful, msg_id=(\d+)[^\d]')
|
||||
msgid_sub2 = res.group(1).decode('utf8')
|
||||
res = dut.expect(r'sent unsubscribe successful, msg_id=(\d+)')
|
||||
res = dut.expect(r'sent unsubscribe successful, msg_id=(\d+)[^\d]')
|
||||
msgid_unsub = res.group(1).decode('utf8')
|
||||
res = dut.expect(r'MQTT_EVENT_PUBLISHED, msg_id=(\d+)')
|
||||
res = dut.expect(r'MQTT_EVENT_PUBLISHED, msg_id=(\d+)[^\d]')
|
||||
msgid_pubd = res.group(1).decode('utf8')
|
||||
assert msgid_pubd == msgid_pub1
|
||||
|
||||
res = dut.expect(r'MQTT_EVENT_SUBSCRIBED, msg_id=(\d+)')
|
||||
res = dut.expect(r'MQTT_EVENT_SUBSCRIBED, msg_id=(\d+)[^\d]')
|
||||
msgid_subd = res.group(1).decode('utf8')
|
||||
assert msgid_subd == msgid_sub1
|
||||
|
||||
dut.expect_exact('sent publish successful, msg_id=0')
|
||||
res = dut.expect(r'MQTT_EVENT_SUBSCRIBED, msg_id=(\d+)')
|
||||
res = dut.expect(r'MQTT_EVENT_SUBSCRIBED, msg_id=(\d+)[^\d]')
|
||||
msgid_subd = res.group(1).decode('utf8')
|
||||
assert msgid_subd == msgid_sub2
|
||||
|
||||
@ -57,7 +57,7 @@ def test_examples_protocol_mqtt5(dut: Dut) -> None:
|
||||
dut.expect_exact('correlation_data is 123456')
|
||||
dut.expect_exact('TOPIC=/topic/qos1')
|
||||
dut.expect_exact('DATA=data_3')
|
||||
res = dut.expect(r'MQTT_EVENT_UNSUBSCRIBED, msg_id=(\d+)')
|
||||
res = dut.expect(r'MQTT_EVENT_UNSUBSCRIBED, msg_id=(\d+)[^\d]')
|
||||
msgid_unsubd = res.group(1).decode('utf8')
|
||||
assert msgid_unsubd == msgid_unsub
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user