You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the phase that defines 1.0. After it, connections stay alive between keywords, no message is lost, and tests say which connection they mean.
Tasks
Connection object
_Connection owns the paho client, per-filter message queues, an unclaimed queue, and acknowledgement events by message id
A single on_message, installed before connecting, puts each message into every matching filter's queue, or into the unclaimed queue when none match
Registering a filter moves matching unclaimed messages into its queue. Registering an existing filter keeps its queue.
One lock per connection guards the filter registry, the unclaimed-queue drain and message dispatch
Keywords
Connect: keepalive= and alias= arguments, reconnect_on_failure=False, connect_timeout equal to the loop timeout, and loop_start(). Wait for CONNACK. On failure, stop the loop and raise with the broker's reason and the host.
Connecting again on a connected alias disconnects the old connection with a warning
Disconnect waits for the disconnect and stops the loop. Disconnect All and Switch Connection are new.
Publish waits for its own acknowledgement and raises with the paho error name on failure
Subscribe waits for its own SUBACK in both modes. Sync mode is shorthand for Subscribe followed by Listen.
Listen returns the oldest messages first and keeps the rest. It never resets the queue.
Unsubscribe waits for UNSUBACK and removes only its own filter
Subscribe And Validate uses the same queues and keeps its error text
Publish Single / Publish Multiple accept protocol as a name or a number
Remove every loop() call and every sleep() from the library
Tests
pytest unit layer with a fake paho client: dispatch, overlap, unclaimed drain, ordering and limit, connect success, failure and timeout, reconnect on the same alias, Disconnect All with one failure, and publish and subscribe errors
A concurrency unit test that registers and unregisters filters while messages arrive from another thread
Move the Robot suites to tests/acceptance/. Async tests name their connections, for example alias=sub and alias=pub.
Part of #39. Design: https://github.com/randomsync/robotframework-mqttlibrary/blob/master/design/MODERNIZATION.md (sections 1.3 and 4.1). Fixes #25, #28, #33. Carries forward ideas from PRs #27 and #23.
This is the phase that defines 1.0. After it, connections stay alive between keywords, no message is lost, and tests say which connection they mean.
Tasks
Connection object
_Connectionowns the paho client, per-filter message queues, an unclaimed queue, and acknowledgement events by message idon_message, installed before connecting, puts each message into every matching filter's queue, or into the unclaimed queue when none matchKeywords
Connect:keepalive=andalias=arguments,reconnect_on_failure=False,connect_timeoutequal to the loop timeout, andloop_start(). Wait for CONNACK. On failure, stop the loop and raise with the broker's reason and the host.Disconnectwaits for the disconnect and stops the loop.Disconnect AllandSwitch Connectionare new.Publishwaits for its own acknowledgement and raises with the paho error name on failureSubscribewaits for its own SUBACK in both modes. Sync mode is shorthand for Subscribe followed by Listen.Listenreturns the oldest messages first and keeps the rest. It never resets the queue.Unsubscribewaits for UNSUBACK and removes only its own filterSubscribe And Validateuses the same queues and keeps its error textPublish Single/Publish Multipleacceptprotocolas a name or a numberloop()call and everysleep()from the libraryTests
limit, connect success, failure and timeout, reconnect on the same alias,Disconnect Allwith one failure, and publish and subscribe errorstests/acceptance/. Async tests name their connections, for examplealias=subandalias=pub.limittest for the new behaviour*Not authorized*Acceptance criteria
loop()orsleep()calls remain insrc/.Sleepis in the keepalive test.limit=0returns exactly 200.keepalive=2and 5 s idle, Publish succeeds.192.0.2.1fails within the loop timeout plus 1 s, and the error names the host.*Not authorized*and leaves no thread behind.Unreleasedlists every behaviour change from the design doc, section 4.2.