Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Is test_mqtt4async hanging?

Hi,

this test program relied on a broker configuration where subscribing to a topic "nosubscribe" is not allowed, to test the 0x80 return code introduced in MQTT 3.1.1. I added it to the test directory to save it for a time when I added these tests to the regular regression tests.

To do that I would need a reliable way of causing subscribe to fail. I could follow Roger's approach for that, or use the network proxy which I've used in the automatic reconnect tests.

Ian

On 06/20/2016 06:19 PM, Guilherme Maciel Ferreira wrote:
Hi all,

Am I doing something wrong or the test_mqtt4async is hanging?

In the test2(), it succeeds subscribing to the "nosubscribe" topic
[https://github.com/eclipse/paho.mqtt.c/blob/develop/test/test_mqtt4async.c#L524].

I guess it should fail, calling the test2_onSubscribe2(). Which in
turn should call the test2_onDisconnect(). Then setting the
test_finished to 1
[https://github.com/eclipse/paho.mqtt.c/blob/develop/test/test_mqtt4async.c#L464].

However, the code loops forever testing the test_finished variable
[https://github.com/eclipse/paho.mqtt.c/blob/develop/test/test_mqtt4async.c#L576-L581].
Which never gets set to 1.

Best regards,

--
Ian Craggs
icraggs@xxxxxxxxxx                 IBM United Kingdom
Paho Project Lead; Committer on Mosquitto



Back to the top