Skip to content

Commit

Permalink
Reproduce thin-edge#3149
Browse files Browse the repository at this point in the history
Signed-off-by: Didier Wenzek <[email protected]>
  • Loading branch information
didier-wenzek committed Oct 28, 2024
1 parent 365c254 commit ecbd54e
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,25 @@ Resume On Restart A Pending Operation Which Workflow Is Deprecated
... timeout=60
Should Contain ${messages[0]} item="what a long sleep"

Resume On Restart A Pending Operation
# Trigger a long running operation
Update Workflow ${CURDIR}/sleep-command.toml sleep
Execute Command
... tedge mqtt pub --retain te/device/main///cmd/sleep/dyn-test-12 '{"status":"init", "duration":120}'

# Restart the agent, once sure the command is executing
Should Have MQTT Messages
... te/device/main///cmd/sleep/dyn-test-12
... message_pattern=.*executing.*
Restart Service tedge-agent

# The command should be interrupted and marked as failed
${messages} Should Have MQTT Messages
... te/device/main///cmd/sleep/dyn-test-12
... message_pattern=.*failed.*
... timeout=60
Should Contain ${messages[0]} item="sleep killed by signal 15"


*** Keywords ***
Custom Setup
Expand Down Expand Up @@ -235,6 +254,8 @@ Custom Test Setup
... tedge mqtt pub --retain te/device/main///cmd/long-running-command/dyn-test-10 ''
Execute Command
... tedge mqtt pub --retain te/device/main///cmd/sleep/dyn-test-11 ''
Execute Command
... tedge mqtt pub --retain te/device/main///cmd/sleep/dyn-test-12 ''

Copy Scripts
ThinEdgeIO.Transfer To Device ${CURDIR}/echo-as-json.sh /etc/tedge/operations/
Expand Down

0 comments on commit ecbd54e

Please sign in to comment.