redboltz / mqtt_cpp

Boost Software License 1.0
432 stars 107 forks source link

Integration tests against other MQTT protocol implementations? #392

Open jonesmz opened 5 years ago

jonesmz commented 5 years ago

Have you considered adding integration tests on continuous integration (travis CI, etc) that has mqtt_cpp connect with other implementations like mosquitto?

redboltz commented 5 years ago

Yes. The earlier version of mqtt_cpp use test.mosquitto.org for test. I added UUID prefix to topic and client id to avoid conflict. However, test.mosquitto.org is not good for CI. It is unstable and continuous connection could regard to an attack.

At that time, I implemented endpoint and test_broker. So I switched my own server. I know that if the common part such as endpoint has a bug, it might not be found. But I compromised.

We can run mosquitto on CI environment instead of using test.moqsuitto.org. But I don't have strong motivation to do that.

It is the current situation.

jonesmz commented 5 years ago

My suggestion in this case was to install mosquito server inside the ci environment. And run it locally.

redboltz commented 5 years ago

My suggestion in this case was to install mosquito server inside the ci environment. And run it locally.

Yes. That is I mentioned "We can run mosquitto on CI environment instead of using test.moqsuitto.org. ".

Now, the test server location is set by https://github.com/redboltz/mqtt_cpp/blob/master/test/test_settings.hpp#L18

And I noticed that mosquitto cert file is already included https://github.com/redboltz/mqtt_cpp/tree/master/test/certs

jonesmz commented 5 years ago

Ah. I read poorly because I was using my phone, instead of a real computer.

Thank you for clarifying.