test/helpers.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 8c9e539586e863adef7ca811eeec086289435ea0 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Feb 17 09:08:34 2020 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Feb 17 10:09:05 2020 +0100 test: improve timeout handling in getResponseMessage() Sometimes unit-each-view fails on me in a situation like this: 21:00:13.331257 [ loolwsd ] TRC debug, testEachView: waiting for message, timeout after 20s| UnitEachView.cpp:66 21:00:20.429615 [ loolwsd ] TRC debug, testEachView: response is empty, will fail| UnitEachView.cpp:72 I.e. for some reason ws.poll() returns after 7 seconds, even if the timeout at test/UnitEachView.cpp is clearly 20 seconds. Fix the problem by trying again in case we got no data -- we'll still break from the loop on timeout. Change-Id: I913ecd692f350b9deb38705a0a2d24e8b3c799a0 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88846 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/test/helpers.hpp b/test/helpers.hpp index 9aa15d518..1a0205475 100644 --- a/test/helpers.hpp +++ b/test/helpers.hpp @@ -289,7 +289,8 @@ std::vector<char> getResponseMessage(LOOLWebSocket& ws, const std::string& prefi if (bytes <= 0) { - break; + // Try again, timeout will be handled above. + continue; } if ((flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) != Poco::Net::WebSocket::FRAME_OP_CLOSE) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits