taverntesting / tavern

A command-line tool and Python library and Pytest plugin for automated testing of RESTful APIs, with a simple, concise and flexible YAML-based syntax
https://taverntesting.github.io/
MIT License
1.02k stars 193 forks source link

Deadlock when executing mqtt-tests #848

Closed felixbohnus closed 1 year ago

felixbohnus commented 1 year ago

If you run

pytest .\dir\

the tests sometimes stops without any further progress. After a short investigation it seems like tavern runs into a deadlock. The problem seems to be that the paho-client uses another thread for executing the callbacks.

As a result the subscribe_lock of the client.py creates a deadlock

michaelboulton commented 1 year ago

I've made a minor modification to the locks in #850 but I can't see anything else that could cause a deadlock. A related question, which version of paho-mqtt are you using? I know some people were having issues with the most recent version, you could try using version 1.5.0 or 1.5.1 and see if that works

michaelboulton commented 1 year ago

This should be fixed in 2.0.5, if not then I suspect it's an issue in paho-mqtt