Skip to content

Commit 071ce62

Browse files
committed
match against a pattern to allow for loser order of messages
Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
1 parent ac1942e commit 071ce62

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/RobotFramework/tests/tedge_flows/tedge_flows.robot

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,7 @@ Order of flow definition updates does not matter
280280
${messages} Should Have MQTT Messages
281281
... topic=te/device/main/service/tedge-mapper-local/status/flows
282282
... date_from=${start}
283-
... message_contains=issue-3978/test.toml
284-
Should Contain ${messages[0]} "updated"
283+
... message_pattern=.*issue-3978/test.toml.*"status":"updated".*
285284

286285
# Check the flow is actually working
287286
${start} Get Unix Timestamp
@@ -301,8 +300,7 @@ Order of flow definition updates does not matter
301300
${messages} Should Have MQTT Messages
302301
... topic=te/device/main/service/tedge-mapper-local/status/flows
303302
... date_from=${start}
304-
... message_contains=issue-3978/test.toml
305-
Should Contain ${messages[0]} "broken"
303+
... message_pattern=.*issue-3978/test.toml.*"status":"broken".*
306304

307305
# The new version of the flow has not been loaded because broken
308306
# and is no more running
@@ -325,8 +323,7 @@ Order of flow definition updates does not matter
325323
${messages} Should Have MQTT Messages
326324
... topic=te/device/main/service/tedge-mapper-local/status/flows
327325
... date_from=${start}
328-
... message_contains=issue-3978/test.toml
329-
Should Contain ${messages[0]} "updated"
326+
... message_pattern=.*issue-3978/test.toml.*"status":"updated".*
330327

331328
# And effective
332329
${start} Get Unix Timestamp

0 commit comments

Comments
 (0)