eclipse / paho.mqtt.testing

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

Bad file descriptor on vanilla run of test suite #67

Open bschwind opened 4 years ago

bschwind commented 4 years ago

I'm attempting to test my broker first for V311 conformance, then later I'll do V5. I'm not even sure if I should be trying to conform to these tests or not, but that's another discussion...

Running python3 client_test.py throws out some errors:

$ python3 client_test.py     
hostname localhost port 1883
clean up starting
clean up finished
Basic test starting
Basic test succeeded
.$ topics test starting
ERROR:root:receive: unexpected exception (<class 'OSError'>, OSError(9, 'Bad file descriptor'), <traceback object at 0x10ae61080>)
$ topics test succeeded
.Keepalive test starting

Is this intentional? If I add a aclient.disconnect() after the testBasic succeeds (right before it prints out that it succeeded), then the issue seems to go away. I'm curious why global variables were chosen for the clients and callbacks, as side effects in one test can affect another if things aren't cleaned up properly. Is this repo still maintained, or is there some newer suite I should be referring to?

OS Details:

MacOS 10.15.5 Python version: Python 3.8.5

I ran this against my own broker and mosquitto, both exhibited the same issue.