test/UnitHTTP.cpp |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 2e3d00130fbb34fc21e963da1c69692053011269
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Mon Feb 24 14:58:22 2020 +0100
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Mon Feb 24 15:52:27 2020 +0100

    test: fix random failure of unit-http test.
    
    Sometimes the text content comes with the first recieve,
    sometimes we need a second recieve to get that.
    Don't fail when we get the content for the first recieve.
    
    Change-Id: I3078995cae3c0cfefdd5f2b8eae8bad4003ec2fd
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89347
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com>

diff --git a/test/UnitHTTP.cpp b/test/UnitHTTP.cpp
index 465d8d04b..bbc2d516d 100644
--- a/test/UnitHTTP.cpp
+++ b/test/UnitHTTP.cpp
@@ -193,6 +193,12 @@ public:
             return;
         }
 
+        // Sometimes we get the content with the first recieve.
+        if (strstr(buffer, "\357\273\277This is some text.\nAnd some more.\n"))
+        {
+            return;
+        }
+
         // Oddly we need another read to get the content.
         got = socket->receiveBytes(buffer, 4096);
         CPPUNIT_ASSERT_MESSAGE("No content returned.", got >= 0);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to