eclipse / paho.mqtt.testing

An Eclipse Paho project - a Python broker for testing
https://eclipse.org/paho
Other
108 stars 73 forks source link

How to test behavior with QoS 1 with connection drop-out mid-publish? #76

Open philCryoport opened 2 years ago

philCryoport commented 2 years ago

Hi there,

We are considering AWS IoT Core.

Our Quality department has asked for us to run a Operational Quality test between the MQTT client and AWS IoT MQTT broker so that we can document evidence of the following behavior:

I looked through the code and the only thing I could find that was close to this was https://github.com/eclipse/paho.mqtt.testing/blob/252b6b9a486336221a5fd9d7cd0560f70e7922d7/interoperability/client_test.py#L322 ...but that only tests if there is no connection to begin with.

In contrast, what I'm seeking is a way to demonstrate behavior:

Help?

icraggs commented 2 years ago

One way to do this, is to use a network proxy between the client and broker which will break the connection at the appropriate point. There is such a simple proxy in the testing repo and the C client repo (paho.mqtt.c) written in Python. It can be altered to cut the connection at the point you want.

philCryoport commented 2 years ago

One way to do this, is to use a network proxy between the client and broker which will break the connection at the appropriate point. There is such a simple proxy in the testing repo and the C client repo (paho.mqtt.c) written in Python. It can be altered to cut the connection at the point you want.

Neat! I'll try it. Thank you!