[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - test/TileCacheTests.cpp
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Sat Oct 19 18:59:28 UTC 2019
test/TileCacheTests.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit e173427bd9ca5939339994180f5b51ea11393050
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed Oct 16 09:09:59 2019 -0400
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 19 20:59:09 2019 +0200
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.
Change-Id: I6c2b80022ffcef2b21c99dd57bca61e7daaadc86
Reviewed-on: https://gerrit.libreoffice.org/80897
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/test/TileCacheTests.cpp b/test/TileCacheTests.cpp
index fd453d995..575caf9f0 100644
--- a/test/TileCacheTests.cpp
+++ b/test/TileCacheTests.cpp
@@ -1226,7 +1226,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;
@@ -1238,7 +1239,7 @@ void TileCacheTests::testTileWireIDHandling()
sendChar(socket, 'x', skNone, testname);
assertResponseString(socket, "invalidatetiles:", testname);
- // For the second input wsd will send one tile, since some of them are indentical
+ // For the second input wsd will send one tile, since some of them are identical.
arrivedTiles = 0;
do
{
@@ -1376,7 +1377,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;
More information about the Libreoffice-commits
mailing list