Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: process pending Cumulocity IoT operations after network disconnections #3170

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
*** Settings ***
Resource ../../../../resources/common.resource
Library Cumulocity
Library ThinEdgeIO

Test Setup Custom Setup
Test Teardown Get Logs

Test Tags theme:c8y theme:operation


*** Test Cases ***
Process any pending operations after connection disruptions
ThinEdgeIO.Bridge Should Be Up c8y

# Disconnect (wait 2.5 times the MQTT keepalive interval which defaults to 60s)
ThinEdgeIO.Disconnect From Network
ThinEdgeIO.Bridge Should Be Down c8y timeout=180

# Create cloud operation whilst the device is disconnected
${operation}= Cumulocity.Get Configuration tedge-configuration-plugin

# Restore connection
ThinEdgeIO.Connect To Network
ThinEdgeIO.Bridge Should Be Up c8y

# WORKAROUND: Request pending operations via SmartREST 2.0
# Execute Command tedge mqtt pub -q 1 c8y/s/us 500

Operation Should Be SUCCESSFUL ${operation}


*** Keywords ***
Custom Setup
${DEVICE_SN}= Setup
Set Suite Variable $DEVICE_SN
Device Should Exist ${DEVICE_SN}
Loading