Details
Description
During QSR-337 it turned out to be a very difficult to debug a simple typo bug as currently msgHandler.cpp in desktop telltales example disconnects test.py immediately if it cannot read data from socket. This in turn makes the test unpredictable as the python program cannot always keep up with the telltales and the connection is closed during testing. Also, stepping or simply delaying test steps is impossible and makes seeing problems on screen difficult.
The reason msgHandler.cpp currently disconnects immediately from the client and not block waiting for more data is that otherwise the GUI might appear hanging as also Qt app's event loop is blocked.
Possible solutions would be to make use of signals and slots to make receiving asynchronous call back or create a new thread for message handling, which could require some synchronization between the threads.
Study the pros and cons of the solutions and implement a working one.
Attachments
For Gerrit Dashboard: QSR-495 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
272104,4 | Fix network socket behavior in desktop telltales | 2.0 | tqtc-boot2qt/qtsaferenderer | Status: MERGED | +2 | 0 |