tests: replace mqtt-logger with custom mosquitto log plugin#4251
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
Robot Results
|
d1310f2 to
b92902b
Compare
b92902b to
aef169e
Compare
aef169e to
0d3a97d
Compare
Bravo555
left a comment
There was a problem hiding this comment.
Overall good direction, but I'm curious if it could make some tests flaky? I ran the entire suite a few times and ended with 4-6 failed tests, "Entity Store Compaction" seems to be particularly flaky for me, failing when run individually, but it doesn't seem to rely on the changed MQTT message matching.
Looking at the test report, completing before the compaction process is completed. So the flakiness I'm experiencing is probably not related to the change. |
I wouldn't rule out mosquitto 2.1.x having some slightly different behaviour than previous versions, but I think in general a lot of our tests are by nature flaky where it seems to come and go over time. But obviously it is something that we have to continuously work on to improve. Update (sorry I originally added this update to your comment): I'm working on a follow up PR which looks to address some flaky tests that I've seen locally, and I'll include this test that you've mentioned and replace the line with |
There was a problem hiding this comment.
Update or remove these?
There was a problem hiding this comment.
Yeah I'll remove this section now since it is very dated.
…er messages Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
Most notable change is that the password_file feature is now provided in a plugin Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
7950250 to
f29a88c
Compare
Proposed changes
Improve the MQTT broker observation and test assertions by replacing the mqtt-logger with a custom mosquitto plugin which logs all mqtt messages directly within mosquitto. It provides more information about the messages as it does not have to adhere to the mqtt protocol.
The "Should Have MQTT Messages" now uses a cli client which is custom written for parsing the log files produced by the new mosquitto plugin.
The code for the mosquitto plugin is located under thin-edge/mosquitto-log, and it requires mosquitto 2.1.x which is made available via a custom built/packaged version of mosquitto thin-edge/tedge-mosquitto.
Notable changes:
Since mosquitto 2.1.x is now used, it brings some additional most of which are detailed in the 2.1.0 release notes:
allow_anonymous=>listener_allow_anonymousTypes of changes
Paste Link to the issue
Checklist
just prepare-devonce)just formatas mentioned in CODING_GUIDELINESjust checkas mentioned in CODING_GUIDELINESFurther comments