Commit graph

38 commits

Author SHA1 Message Date
Ashod Nakashian
151d1ff955 loolwsd: unittest fixes
Change-Id: I7096b6dabfa59a536809c4e997168c8fce5791f0
Reviewed-on: https://gerrit.libreoffice.org/28578
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 04:09:23 +00:00
Ashod Nakashian
534ab15d2f loolwsd: more aggressive test for unresponsive clients
Change-Id: I9daf81661cf03be2ea38b5bc4d9688039912bd8a
Reviewed-on: https://gerrit.libreoffice.org/28577
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 04:07:53 +00:00
Ashod Nakashian
571ff06906 loolwsd: canceltiles re-designed using tilecache instead of queue
Change-Id: I4b9ba91ee08bc9dd8d27df275e303f5517d9740c
Reviewed-on: https://gerrit.libreoffice.org/28526
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-31 04:44:56 +00:00
Ashod Nakashian
494feedd8d loolwsd: unittest cleanup
Change-Id: I60b8c783b16f37530d208f1fdad029d97996e4cc
Reviewed-on: https://gerrit.libreoffice.org/28523
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-31 04:40:25 +00:00
Ashod Nakashian
5158818d82 loolwsd: getDocSize -> parseDocSize
Change-Id: I82ee96d6fde8d8c379547d05d7bbb8213a474a4f
Reviewed-on: https://gerrit.libreoffice.org/28522
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-31 04:39:43 +00:00
Ashod Nakashian
1e2dd2d61f loolwsd: TileCacheTests cleanup
Change-Id: I6d09ed3216d4e3651f72c0387c8cc6f2a7d5cc90
Reviewed-on: https://gerrit.libreoffice.org/28516
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-31 04:34:24 +00:00
Ashod Nakashian
6194b043c0 loolwsd: better UT failure message
Change-Id: Iad269910b1a38f67d87811590ffecefe27ba99cd
Reviewed-on: https://gerrit.libreoffice.org/28116
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:00:20 +00:00
Ashod Nakashian
807b3c2e55 loolstress: support trace file compression
Compression to .gz is supported and is controlled
via the XML configuration.

Change-Id: If26fad2c0b5f3c4ffd93362608644dc917172a41
Reviewed-on: https://gerrit.libreoffice.org/27975
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-08 03:57:35 +00:00
Ashod Nakashian
18ab6d28bf loolwsd: refactored png decoding into own function
Change-Id: I8310b3880f2171c26cecbee4cb1780889d38ea31
Reviewed-on: https://gerrit.libreoffice.org/27973
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-08 03:55:44 +00:00
Ashod Nakashian
d56f9a0386 loolwsd: status now includes the view-ID of the client
Change-Id: Iac1cd806ac24ff3956624513946921020d248664
Reviewed-on: https://gerrit.libreoffice.org/27585
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-27 15:55:09 +00:00
Ashod Nakashian
42f857efe0 loolwsd: cleanup of testTileInvalidateCalc
Change-Id: Ic15d12f0b203244b3de1b80e97866f134efd82f7
Reviewed-on: https://gerrit.libreoffice.org/26992
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-07 03:49:31 +00:00
Ashod Nakashian
0eba4a17f8 loolwsd: remove unnecessary wait for invalidatetiles in tests
Change-Id: Ica79b995ef14fbf7d57e9ef435c87a84d854d5b8
Reviewed-on: https://gerrit.libreoffice.org/26991
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-07 03:49:07 +00:00
Ashod Nakashian
370c21f4b5 loolwsd: fix testTileInvalidateWriter
Change-Id: I701c348cbfe55f850bb2180b400020d1b1b01f31
Reviewed-on: https://gerrit.libreoffice.org/26989
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-07 03:35:43 +00:00
Ashod Nakashian
bf66f7a908 loolwsd: Calc tile rendering test with editing
Change-Id: Ib02a079bf1e4e90c7dfb65b6038b3ca1423a673c
Reviewed-on: https://gerrit.libreoffice.org/26448
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-17 23:56:26 +00:00
Miklos Vajna
3c32bc1724 LOOLKit: fix loss of callback during initializeForRendering()
Impress deletes the current view and creates a new one during that call,
so make sure at the end our registered callback is not lost. With this,
the order matches how it's done in gtktiledviewer.

This fixes the HTTPWSTest::testInsertDelete() test when per-view
callbacks are enabled.

Also remove the assert from TileCacheTests::testTileInvalidateWriter()
that would assume something is invalidated right after load: the hope is
that it's possible to load a document without invalidating anything...
:-)
2016-06-16 12:15:11 +02:00
Miklos Vajna
70f5b914f6 TileCacheTests: assert before possible nullptr deref / div by zero 2016-06-15 18:04:57 +02:00
Miklos Vajna
9ac53ef5f5 TileCacheTests: disable testTileInvalidateCalc for now
It fails for me and Ashod as well.
2016-06-15 15:30:37 +02:00
Mike Kaganski
9ef285cc33 loolwsd unit test: invalidate tiles while typing
This test simulates characters and combined characters being
typed to loolwsd, and verifies that each causes tile(s)
invaliations

Change-Id: I670659de3a9eb71e94c366c96e69e6efd4338c38
Reviewed-on: https://gerrit.libreoffice.org/24928
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-14 22:20:36 +00:00
Ashod Nakashian
3b6009fa56 loolwsd: fixed testLoad12ods
Change-Id: Iec0bb481da7af71b210463613617a7272209bfb3
Reviewed-on: https://gerrit.libreoffice.org/25947
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-06 01:55:18 +00:00
Henry Castro
58580a45ce loolwsd: test: update unit test getPartHashCodes 2016-05-30 20:26:40 -04:00
Ashod Nakashian
157386e3bc loolwsd: process tiles under the cursor with priority
Change-Id: I7993ee049c5c0835cae588ff54163f135c4f8b02
Reviewed-on: https://gerrit.libreoffice.org/25345
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:57:16 +00:00
Ashod Nakashian
6e54fd05f9 loolwsd: merge saveTile and notifyAndRemoveSubscribers
Change-Id: I8282604c02a9fd1a7a1e2a5df29e2f84fca151a6
Reviewed-on: https://gerrit.libreoffice.org/25344
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:54:55 +00:00
Ashod Nakashian
ecaf45f9d3 loolwsd: tests should request tiles after invalidatetile
Change-Id: I32637d7e34a80577e99b764705bddf104df0278a
Reviewed-on: https://gerrit.libreoffice.org/25342
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:53:00 +00:00
Ashod Nakashian
65ed424199 loolwsd: new tile performance test
Change-Id: I08d477ec5f04de9f82c49263f35ebbf38a968f31
Reviewed-on: https://gerrit.libreoffice.org/25335
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:44:36 +00:00
Ashod Nakashian
5d9140c3bb loolwsd: simplify checkBlackTiles test
Black tiles are returned when rendering fails.
This happened due to bccu#1610 where internally
core collected cell info on the first 1024 rows
only. Anything beyond that always failed.

This limitation is now removed using dynamic
array to collect the cell info.

Regardless, the test here needs only check that
the last tile (really, anything beyond the 1024th row)
doesn't return a black tile.

This single tile still takes over 10 seconds to render,
which is the other issue that Core suffers from when
collecting cell info on a huge tab.

Change-Id: I7a1a5b7c2b2ed2cc4399160e096be5e57895af77
Reviewed-on: https://gerrit.libreoffice.org/25333
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:39:20 +00:00
Henry Castro
22db071689 loolwsd: test: add checkBlackTiles 2016-05-22 19:53:24 -04:00
Ashod Nakashian
fae850189d loolwsd: include cleanup and organization
A source file (.cpp) must include its own header first.
This insures that the header is self-contained and
doesn't depend on arbitrary (and accidental) includes
before it to compile.

Furthermore, system headers should go next, followed by
C then C++ headers, then libraries (Poco, etc) and, finally,
project headers come last.

This makes sure that headers and included in the same dependency
order to avoid side-effects. For example, Poco should never rely on
anything from our project in the same way that a C header should
never rely on anything in C++, Poco, or project headers.

Also, includes ought to be sorted where possible, to improve
readability and avoid accidental duplicates (of which there
were a few).

Change-Id: I62cc1343e4a091d69195e37ed659dba20cfcb1ef
Reviewed-on: https://gerrit.libreoffice.org/25262
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 15:52:54 +00:00
Ashod Nakashian
d18bca992c loolwsd: use TileDesc instead of explicit values
Change-Id: I56ba6c4e63a495500093e7353477175d40152d11
Reviewed-on: https://gerrit.libreoffice.org/25020
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-15 23:00:43 +00:00
Ashod Nakashian
cfe414cc8a loolwsd: simplified duplicate code with utility
Change-Id: I2b9d88a78e73065d65b1722d363e8492f80438c9
Reviewed-on: https://gerrit.libreoffice.org/25017
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-15 22:54:51 +00:00
Ashod Nakashian
0c004f46d0 loolwsd: improved test logging
Change-Id: I1f663d9f3eac0d03cda0f4bbbd3c0b9102bec12b
Reviewed-on: https://gerrit.libreoffice.org/24968
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-13 12:57:58 +00:00
Henry Castro
0f444af60d loolwsd: test: update sending "status" message 2016-05-11 01:22:57 -04:00
Henry Castro
4abc68bfb7 loolwsd: test: update loading views 2016-05-11 01:01:18 -04:00
Ashod Nakashian
fd1412c03c loolwsd: test fixes to match latest changes
Change-Id: I6e972a8b6b77728885b56f520355ed30aff4b197
Reviewed-on: https://gerrit.libreoffice.org/24820
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-10 03:58:49 +00:00
Ashod Nakashian
25c550ff8e loolwsd: test that slow/hung clients don't block others
Change-Id: I16697ab3afd1d209a77d48506604ec7babc1bfff
Reviewed-on: https://gerrit.libreoffice.org/24655
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 12:38:09 +00:00
Jan Holesovsky
68ed15628d Another place that hardcodes the URI. 2016-05-04 13:56:39 +02:00
Ashod Nakashian
bc58536113 loolwsd: new tiles unittest
Change-Id: Id63f1ae03c1d33dec666c43d64042838df10c29d
Reviewed-on: https://gerrit.libreoffice.org/24646
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:38:27 +00:00
Ashod Nakashian
cdb5f9c2da loolwsd: moved tile tests to TileCacheTests.cpp
Change-Id: I6bc681772104615b79bbe3a21ccaead01abde4dd
Reviewed-on: https://gerrit.libreoffice.org/24642
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:37:10 +00:00
Ashod Nakashian
516bad1942 loolwsd: TileCache whitebox tests
New unittests to verify TileCache logic on the unit level.

Change-Id: Ia36181e850b349abb88ba5f04f1e5244771bacc6
Reviewed-on: https://gerrit.libreoffice.org/24574
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-01 17:18:35 +00:00