-
Also fix sending an UNSUBACK instead of SUBACK on unsubscribe.
-
Cross-protocol, received messages on existing subscriptions would get retain=1, which is wrong.
-
And make it test accross protocol versions.
-
And also made it test accross protocol versions.
-
And make it test cross-protocol.
-
Was caught by refactor testNotMessingUpQosLevels away from QMQTT, which didn't trip on this bug.
-
Also add a test to test all scenarios. This also fixes session clean_start, which was never done since the MQTT5 refactor to clean_start (vs clean session).
-
It timed out sometimes. When it works, it doesn't even take longer, because it's just the timeout.
-
It was caught by an assert. In release mode, this simply meant subscribing to 0 still gave you QoS messages.
-
Fixes assertion error in debug only.
-
It was flakey. I also ported it to the new test client.
-
The order packets would (mostly) arrive, is 'retained publish', then 'sub ack'. This is now fixed. This also stablizes test_retained_changed(). The test was also refactored to use the new test client.
-
This prevents confusion when another instance of FlashMQ is running. This is not the final way. For instance, when SSL connections will also be tested, this won't work anymore.
-
Now that parsing and handling of packets is separated, we can use the main code to parse packets in the new FlashMQTestClient. This allows great flexibility in inspecting the server response in a flexible manner. We now also have the ability to make tests for MQTT5 features.
-
This is necessary for the test client I have in mind, so I can re-use this code in that new test client which has no MQTT behavior, but just returns packets (meaning I have to be able to parse them without initiating handling).
-
This needed a separation: getting the current thread, and getting the thread of the client you're queueing a command for. This also resolves a circular reference between Client and ThreadData.
-
Instead of the thread data, which didn't make sense.
-
This required adding a global stats object. It also contains a bit of refactor to make a type out of the derived counters.
-
This makes much more sense than returning the amount of messages sent all the way up the call stack.
-
It tested the wrong thing. Tests still pass.
-
This allows easier saving of MQTT5 properties, for which a new file version for retained messages is created. It uses the packet parsing logic.
-
Because clients can now also exist as dummy objects, I had to add some extra checks. Also split up handlePublish() and the new parsePublishData().
-
Only mqtt3 though.
-
I need to decide what to do with getPublishData and that disabled test needs repurposing.
-
The behavior for MQTT3 clients in the same, but I replaced the term 'clean session' and described the behavior in MQTT5 terms, of 'clean start' and an expiry interval.