Commit graph

39 commits

Author SHA1 Message Date
Miklos Vajna
c04fd49d42 TileCacheTests: these writes are never read
They are written again inside the do { ... } while (...) which runs at
least once.

Change-Id: I9ff07d7cb68b73bccf1bd38490fcba615b87a6ba
2018-12-05 09:14:50 +01:00
Ashod Nakashian
03f58b9a9a wsd: disable tile caching when TileCachePersistent is false
Change-Id: I660438d478ab6d1ef60575b5f63b71c8b86bab4f
2018-10-12 17:43:31 +02:00
Tamás Zolnai
f16a868226 Reduce the running time of testWireIDFilteringOnWSDSide
Change-Id: I1c7e576aaa1af938380a2de33b1512b31ef6ca75
2018-10-01 18:36:50 +02:00
Tamás Zolnai
4512d4090f Reduce the running time of these this test
Change-Id: Iaf72007309e8e2aca09a01e7d1637f2875f3e564
2018-10-01 18:29:20 +02:00
Tamás Zolnai
ac2cd92d25 Upper limit of sent out versions of the same tile
We try to decrease the network usage with avoiding sending out
to much tiles to the client. When we already sent out two versions
of the same tile without having the tileprocessed message from the
client we delay sending out the next version to avoid spamming tiles
on the network.

Change-Id: Ia47cd7c0d3fb829f6777f0c3265970433591df19
2018-09-29 09:27:06 +02:00
Tamás Zolnai
a1e2acd5ef Better to have a smaller tiles-on-fly limit
It's good if this limit big enough to send all the tiles of the
current visible area at once, so the tiles arrive at the same
time to the client by zoom or scroll. Now this value is set to a bit
bigger so if we have a small amount of tiles before zoom / scroll we'll
still see the same on the client side.

Change-Id: I8e28dbf6197fe2f683fe9528e9a32c15a191b20e
2018-09-29 09:27:06 +02:00
Tamás Zolnai
9683f53a9c Filter out tiles by wired on wsd side too
Some times tiles with the same wireID survives the wireID
filtering in kit, so we should do that in wsd too.
The issue is with the tilesBeingRendered construction. First when
one tile is filtered out on kit side the client remains subcribed
to the tile, since wsd does not know filtering happened.
Second via the tilesBeingRendered object more clients can be subcribed
to the same tile and so when one client request a new version of this
tile (with an old wireID) the rendered tile is sent to all subscribed
clients even if the other clients has up-to-date tiles.

Change-Id: I4ca6b7a83a5d6979a9f924d766a71aba5e5362c7
2018-09-29 09:27:06 +02:00
Tamás Zolnai
a1a0bf3718 Don't send tiles which was changed outside of the visible area
Since this commit:
9473908d45
We can avoid that, because the tiles will be invalidated
on the client side and when the client visible area changes
the invalidated tiles are requested anyway.

Change-Id: I272e3b4b87380ae574c16a2b480dbc8caabf4b32
2018-09-29 09:27:06 +02:00
Tamás Zolnai
5260eae05f Avoid rendering / sending the same tile twice
When we're doing the prerendering we also need to register
a tileBeingRendered object, so we know that the given tile
will arrive soon. In earlier version of the code, rendering
and sending of the tile was not separated in time, but now it is,
so we need create a tileBeingRendered object even if we don't
subscribe the client to it yet.

Change-Id: I1374c22e5ffebe1d6fcc6e37261ddcedeb9066ec
2018-09-29 09:27:06 +02:00
Tamás Zolnai
1e0b4928ad Remove this printing line used only for debugging
Change-Id: I482adcac61cf2fa4bec4fb02feec0e23370a3e45
2018-09-03 16:54:12 +02:00
Tamás Zolnai
8085b112dc Add some test for the new tile rendering code
Change-Id: I92e925740e67a62cd69e8c8135484c10d74dabc8
2018-08-30 18:43:43 +02:00
Tamás Zolnai
1001f083f1 Remove this test, it just dumps the result instead of assert on that
Change-Id: Id9976d98bbd30cb38cee86b1ff45b96922065d11
2018-08-16 16:02:20 +02:00
Tamás Zolnai
4d1ffab941 Disable testCancelTilesMultiView
It's seems unstable. After canceltiles wsd still can send tiles
if they already in the senderqueue.

Change-Id: I28f669aa18dfbfee1d9d242bd1ee3d0490f06c68
2018-08-03 13:50:40 +02:00
Tamás Zolnai
33a0cb1ee7 Fix failing unit tests after latency changes
With the new code, wsd is waiting for tileprocessed messages
if the upper limit of tiles-on-fly limit is reached. To avoid that
send canceltiles message.

Change-Id: Iadf16c834f12d14000d630078882dfa8e11a99a0
2018-07-19 14:19:07 +02:00
Michael Meeks
ed87891d28 Make PNG tile tests more robust.
Change-Id: Id7afcfe9b29b2d5544e296b13f04c195d35655b5
2018-05-18 14:32:50 +01:00
Ashod Nakashian
2562d8919a ut: log the test name for easier traceability
Change-Id: Icbcbb36857b748c2ac2d0d36a5c4c23609f5453a
Reviewed-on: https://gerrit.libreoffice.org/49568
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-11 19:22:14 +01:00
Ashod Nakashian
7be98efd93 ut: log timestamp to track timeouts better
And improve the logging support in unit-tests to
help troubleshoot issues faster and more accurately.
Also makes the code more readable (hopefully).

Change-Id: I4f8aafb5245e2f774b03231591a74544f9ec84aa
Reviewed-on: https://gerrit.libreoffice.org/48645
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-11 19:21:15 +01:00
Miklos Vajna
4bcfdbb5b3 test: spell out non-trivial autos to improve readability
Change-Id: Ie3b4b961c50ab61ef63380c4724a0f00e8f960d2
2018-02-07 10:18:12 +01:00
Pranav Kant
f63858433b loplugin:includeform
Change-Id: Ib62a7aa61062f00698aa3e8a144438de5c57e53d
2017-12-20 21:21:05 +05:30
Miklos Vajna
a3d6dee503 Remove unused strings
Change-Id: I621c462bca38222dcf26dfa1e414cf27e1a3e088
2017-11-03 15:25:09 +01:00
Michael Meeks
097cc58d53 Run old-style unit tests as a new-style unit test.
This moves the code into the same process, for easier logging & debugging.

Disabled initially.

Change-Id: Id48b5649ba14deb0a2159ca59e321c7d0ae66dad
2017-06-02 18:33:26 +01:00
Ashod Nakashian
7633525904 wsd: correct the name of testDisconnectMultiView in output
Change-Id: Ibfcee83825bf8f48e635d93061bf4fd1306a95fc
Reviewed-on: https://gerrit.libreoffice.org/37371
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-05-08 04:52:39 +02:00
Ashod Nakashian
0feea0e80e wsd: include cleanup in test
Change-Id: Ie54aabc74e8980f3131a66f3610c1dcdd9f668ff
Reviewed-on: https://gerrit.libreoffice.org/36600
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-17 07:08:58 +02:00
Jan Holesovsky
fb4fbdd575 Disable the unreliable unit tests.
Change-Id: I1de9cc566b1b88563152aa36a5505867e46ea2af
2017-04-06 16:58:42 +01:00
Ashod Nakashian
3816b0c8eb wsd: faster and more informative tile tests
Change-Id: Ifcd179600ca1b019f43a86eaf0fd11a5d8a6177a
Reviewed-on: https://gerrit.libreoffice.org/33667
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-30 02:03:54 +00:00
Jan Holesovsky
da93cd416b Temporarily disable, these tests are affected by the order of invalidates.
Change-Id: Icd08629315417f3ca8f2c5560271a12c62309956
2017-01-27 19:17:42 +01:00
Ashod Nakashian
f861a9e1a7 wsd: new unittest for multiview tiles when disconnecting
When there are many views requesting tiles,
disconnecting any should not cancel tiles
for other views.

Change-Id: I6029432c4b9ab931811dcb3b03b0441b413a9971
Reviewed-on: https://gerrit.libreoffice.org/32872
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-09 06:27:43 +00:00
Ashod Nakashian
92ac46e5f1 wsd: no need to render all tiles of all parts in unittests
Change-Id: I4d2eadf64f0c86e4b83af2f25a772f4b88d6a987
Reviewed-on: https://gerrit.libreoffice.org/32869
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-09 06:24:20 +00:00
Ashod Nakashian
93c66eeb9b wsd: fixup tileInvalidatePartImpress
Since the Impress slides use large fonts, we end up
overflowing the part bounds with this test.

Luckily the top row of text has smaller font, and
more vertical space within the slide, so now
we edit the top-left textbox and this test
doesn't fail anymore (tested 50 times) when
it failed ~1 in 4 previously.

Change-Id: I13d8cc4462d48b128578a9d3fdde90a79c607c4b
Reviewed-on: https://gerrit.libreoffice.org/32862
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-09 06:19:35 +00:00
Ashod Nakashian
4e9e019564 wsd: refactor/dedup the lokit process counting tests
Change-Id: Iebf7756c6a5c2bc581a0ade4fe13fad752eb7d20
Reviewed-on: https://gerrit.libreoffice.org/32861
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-09 06:18:43 +00:00
Ashod Nakashian
4580ed4e27 wsd: prefix the test docs with the test name
This makes debugging much easier as one can
readily match WSD logs with a given test.

Change-Id: I8f2c83d67189038699af3f24dee205bc7efb5c28
Reviewed-on: https://gerrit.libreoffice.org/32860
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-09 06:17:43 +00:00
Tor Lillqvist
a36d4b0fc3 Reanme png namespace to Png for consistency
As far as I see, we tend to use the same namespace name as the
basename of the corresponding include file, and this stuff is defined
in a file called Png.hpp.

Change-Id: Id859e13e94568abd9f1d5b4ef3bfbbb0c156db11
2017-01-04 13:35:26 +02:00
Ashod Nakashian
6f6f308895 wsd: more robust canceltiles unittest
Change-Id: I0a71bbb84ff4ca3233d8a78a7c4b3718ec0ad382
Reviewed-on: https://gerrit.libreoffice.org/32634
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-02 06:19:44 +00:00
Ashod Nakashian
7dad1c5f6a wsd: more forgiving canceltiles unittests
canceltiles is not guaranteed to prevent
tiles from getting sent back to the client.

There is an obvious race between receiving
tile requets and cancelling them.

This reduces failures by repeating the
unittest when there is spurious failure.

Change-Id: Icf299e2212e175dc4c0cbc1d2f91c37725f2b261
Reviewed-on: https://gerrit.libreoffice.org/32631
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-02 06:17:21 +00:00
Noel Grandin
4ed820d3d5 add a configure option for using clang compiler plugins
and apply the nullptr plugin.

Lots of hacking in my LO tree required to make this work, will probably
end up needing to add an extra parameter to the LO side.

Change-Id: I02ae1dcdece9d9ddf05f7757f6696e3a5d7d1f14
Reviewed-on: https://gerrit.libreoffice.org/32339
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-12-22 14:23:42 +00:00
Noel Grandin
4199efc91c convert enums to scoped
Change-Id: Ic3d4c09dbcec28b4638bb8888f812f970f40a1c5
Reviewed-on: https://gerrit.libreoffice.org/32331
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-12-22 09:51:56 +00:00
Tor Lillqvist
dc18ccfd56 The part number we get here seems to be always 1, not 0
No deeper understanding of what is going on... This is when running
against cp-5.1
2016-12-05 11:02:26 +02:00
Michael Meeks
c1a398977f Adapt makefiles, includes etc. to new locations. 2016-11-25 09:58:57 +00:00
Michael Meeks
cca657c8f2 Apply the pre-branch rename script to re-organize the source. 2016-11-25 09:58:48 +00:00
Renamed from loolwsd/test/TileCacheTests.cpp (Browse further)