test/TileCacheTests.cpp |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 4ff376bb454ccb0c6d2106c978323305d0a2bb08
Author:     Ashod Nakashian <ashod.nakash...@collabora.co.uk>
AuthorDate: Wed Oct 16 09:09:59 2019 -0400
Commit:     Michael Meeks <michael.me...@collabora.com>
CommitDate: Mon Oct 28 12:01:38 2019 +0100

    testTileWriteIDHandling: don't block for too long
    
    When polling for tile messages, the last wait
    (which will timeout) by default will be 10 seconds.
    This is too long to make the tests fast enough, and
    also results in the internal cache from evicting
    tiles in some cases.
    
    Reviewed-on: https://gerrit.libreoffice.org/80897
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    Tested-by: Andras Timar <andras.ti...@collabora.com>
    (cherry picked from commit e173427bd9ca5939339994180f5b51ea11393050)
    
    Change-Id: I6c2b80022ffcef2b21c99dd57bca61e7daaadc86
    Reviewed-on: https://gerrit.libreoffice.org/81568
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    Tested-by: Michael Meeks <michael.me...@collabora.com>

diff --git a/test/TileCacheTests.cpp b/test/TileCacheTests.cpp
index 0eba9e2d3..ad0f46823 100644
--- a/test/TileCacheTests.cpp
+++ b/test/TileCacheTests.cpp
@@ -1145,7 +1145,7 @@ void 
TileCacheTests::requestTiles(std::shared_ptr<LOOLWebSocket>& socket, const
 
             sendTextFrame(socket, text, name);
             tile = assertResponseString(socket, "tile:", name);
-            // expected tile: nviewid=  part= width= height= tileposx= 
tileposy= tilewidth= tileheight=
+            // expected tile: nviewid= part= width= height= tileposx= 
tileposy= tilewidth= tileheight=
             Poco::StringTokenizer tokens(tile, " ", 
Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM);
             CPPUNIT_ASSERT_EQUAL(std::string("tile:"), tokens[0]);
             CPPUNIT_ASSERT_EQUAL(0, 
std::stoi(tokens[1].substr(std::string("nviewid=").size())));
@@ -1243,7 +1243,8 @@ void TileCacheTests::testTileWireIDHandling()
     bool gotTile = false;
     do
     {
-        std::vector<char> tile = getResponseMessage(socket, "tile:", testname);
+        // If we wait for too long, the cached tiles will get evicted.
+        std::vector<char> tile = getResponseMessage(socket, "tile:", testname, 
500);
         gotTile = !tile.empty();
         if(gotTile)
             ++arrivedTiles;
@@ -1393,7 +1394,7 @@ void TileCacheTests::testTileBeingRenderedHandling()
     bool gotTile = false;
     do
     {
-        std::vector<char> tile = getResponseMessage(socket, "tile:", testname);
+        std::vector<char> tile = getResponseMessage(socket, "tile:", testname, 
500);
         gotTile = !tile.empty();
         if(gotTile)
             ++arrivedTiles;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to