Commit graph

423 commits

Author SHA1 Message Date
Henry Castro
c6c2040849 loolwsd: test: log more info for each view 2016-09-17 18:13:56 -04:00
Henry Castro
a613025b0e loolwsd: test: add view name verbose 2016-09-17 18:13:32 -04:00
Ashod Nakashian
3d9b50aeeb loolwsd: unittest runner improvement and logging
Change-Id: I4ddce1775b620e9140366ae7965b37b6cce8689e
Reviewed-on: https://gerrit.libreoffice.org/28958
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-16 12:37:52 +00:00
Ashod Nakashian
b26b52af61 loolwsd: unittest for tile prioritization
Change-Id: Ib5ea6b94d651124106069f8d796b7359c92639a8
Reviewed-on: https://gerrit.libreoffice.org/28957
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-16 12:36:10 +00:00
Ashod Nakashian
d2872846d8 loolwsd: cleanup of unittests and helpers
Change-Id: I03a5cb29b51409f3b8cc51981b522248a29a6ba3
Reviewed-on: https://gerrit.libreoffice.org/28955
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-16 12:31:59 +00:00
Tor Lillqvist
42fdb3b079 Drop always-defaulted 'timeoutMs' parameter to countLoolKitProcesses()
Also, drop the pointless use of POLL_TIMEOUT_MS, we first multiplied by
it and then divided.
2016-09-16 12:52:55 +03:00
Henry Castro
4d6fadfc0b loolwsd: test: simplify each view 2016-09-15 16:00:02 -04:00
Tor Lillqvist
4197bc5881 Don't hide errors behind a bogus default
If TDOC is not defined, this is broken. Defining it as "" in that case
won't fix anything. Use abs_top_srcdir to be less dependent on what
the cwd is when the code runs.
2016-09-15 21:32:35 +03:00
Henry Castro
a97d6f5449 loolwsd: test: graphic view selection 2016-09-15 14:14:49 -04:00
Miklos Vajna
27220aea39 test helpers: avoid unnecessary copies
Change-Id: I014cedcc10078ce03d1f4f3ae9403b6282b7dcac
2016-09-15 10:33:26 +02:00
Henry Castro
e9f3fd4e56 loolwsd: test: cell view cursor 2016-09-08 12:16:51 -04:00
Henry Castro
f751d36c8f loolwsd: test: view cursor visible 2016-09-08 10:27:42 -04:00
Henry Castro
d4d764cee5 loolwsd: test: invalidate view cursor 2016-09-07 12:21:34 -04:00
Ashod Nakashian
16605b9289 Revert "loolwsd: canceltiles re-designed using tilecache instead of queue"
This reverts commit 571ff06906.

Change-Id: Icf9caeafc640b815f64211f240cfdac8e91694a1
Reviewed-on: https://gerrit.libreoffice.org/28595
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 12:37:47 +00:00
Ashod Nakashian
77a693c353 Revert "loolwsd: remove tile queue and simplify tile response"
This reverts commit 59eaacd2f8.

Change-Id: Ieba9bbaaa6406e3e685b46ce12a44a0766127815
Reviewed-on: https://gerrit.libreoffice.org/28594
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 12:37:38 +00:00
Michael Meeks
1dce882fd1 Start of simpler input fuzzer. 2016-09-01 10:11:03 +01:00
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
59eaacd2f8 loolwsd: remove tile queue and simplify tile response
Tile queue was used to process canceltiles commands.
Since those are handled by TileCache, there is no need
for queues and the threads that pump them.

But because these queues were also used to buffer between
WSD internals and clients, such that a slow client wouldn't
block WSD while sending back tiles, it is necessary
to reword that logic.
In subsequent commits that will change as well.

With this change not only do we save a thread per client,
but we also reduce latency of tile, and improve typing
responsiveness, by almost 3x or more! Latencies are
down to ~15ms from almost 50ms.

Change-Id: I9bb5856efed28caea9d4e6f94f77b093779e5241
Reviewed-on: https://gerrit.libreoffice.org/28575
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 03:59:31 +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
42624adf19 loolwsd: fixup unittests
Change-Id: Icf3dea11654cf43a8aa86fadc1f1276d796719c3
Reviewed-on: https://gerrit.libreoffice.org/28518
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-31 04:35:55 +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
5ffcafa736 loolwsd: CPPUNIT_TEST_NAME can be regex
To run selective tests only, CPPUNIT_TEST_NAME
envar can be defined to hold the test-name,
for example TileCacheTests::testClientPartImpress.

Now it's possible to pass a regex value instead,
for example TileCacheTests::testC.* to run both
TileCacheTests::testClientPartImpress and
TileCacheTests::testClientPartCalc.

Change-Id: I96aa1ce242fd8afaf073527777be50308dce867c
Reviewed-on: https://gerrit.libreoffice.org/28515
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-31 04:33:45 +00:00
Henry Castro
cd40f694ab loolwsd: test: optimal column/row width/height 2016-08-30 17:47:59 -04:00
Ashod Nakashian
03921a0769 loolwsd: unittest cleanups
Change-Id: Ic383915012ac1c254960d976cc89d3f7c1a2cb02
Reviewed-on: https://gerrit.libreoffice.org/28440
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-28 18:50:11 +00:00
Ashod Nakashian
5656f84401 loolstress: benchmark statistics are calculated and reported
Statistics include:
Total latency from input to tile.
Tile rendering time.
Tile-cache response time.

The lowest latency for each is reported and the
95th percentile as well.

The rendering and cache-serving power is
calculated as Mega-Pixels per second.

Change-Id: Ib1baede818444c92f553eaf3e6b17dc617c51b0f
Reviewed-on: https://gerrit.libreoffice.org/28310
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-22 06:00:43 +00:00
Ashod Nakashian
a46d9a55b3 loolwsd: refactor getTileMessage
Move CppUnit assertions into assertTileMessage
to allow for reusing getTileMessage without
dependency on CppUnit.

Change-Id: I35592d440910854dc207db533292efd6f1520c0b
Reviewed-on: https://gerrit.libreoffice.org/28308
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-22 05:52:30 +00:00
Ashod Nakashian
415796d69a loolwsd: unittest fixes
Change-Id: Ia08135bfaadbf4f59b658f7563ac4d40e6abacac
Reviewed-on: https://gerrit.libreoffice.org/28293
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-22 05:00:28 +00:00
Ashod Nakashian
b9a2d7fcaf loolwsd: unit-test misbehaving client that connects without loading
Change-Id: I1cef429a9310450c1b317f65475536db5d8a8306
Reviewed-on: https://gerrit.libreoffice.org/28289
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-22 04:38:19 +00:00
Ashod Nakashian
a805b06874 loolwsd: fix unittest regressions
Change-Id: I502c87a2c6eb3d34c0e137c774c1c77bec8f50d9
Reviewed-on: https://gerrit.libreoffice.org/28144
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 12:12:39 +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
Henry Castro
e41f8581d2 loolwsd: test: column/row re-size 2016-08-13 20:11:24 -04: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
b9b3a41952 loolwsd: compare uncompressed PNG in unittests
Change-Id: I5d8db39a0076bcb83d786b6afff96cd84a1f1360
Reviewed-on: https://gerrit.libreoffice.org/27974
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-08 03:56:38 +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
e3427aff34 loolwsd: when TDOC is not defined assume blank
Change-Id: Iaf8ee6a8dff8dc4d602e7622a288a43b3459fb92
Reviewed-on: https://gerrit.libreoffice.org/27956
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-08 03:48:12 +00:00
Pranav Kant
b8ef017610 Move JWT auth to inside websocket to prevent CSRF
... instead of setting a httpOnly cookie for admin websocket
endpoint which can be CSRFed.

With this, we remove the httpOnly tag on jwt cookie so that
scripts in admin html pages can access the jwt cookie and
authenticates after opening websocket endpoint. Until
authenticated using 'auth authToken' command, admin will not
respond to any admin command.

Also, adapt admin test these changes
2016-07-29 12:03:14 +05:30
Ashod Nakashian
219143ceda loolwsd: unittest fixes for multiview
Three tests still fail and seem to be regressions
due to multiview. When WSD is not running with
multiview support, these tests pass.

Change-Id: Ice3224d92d10f761cb8827d35c9c0c5dd82ae308
Reviewed-on: https://gerrit.libreoffice.org/27587
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-27 15:59:29 +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
24da5ce6e0 loolwsd: unittest fix
Change-Id: I371d7480e648cd2b28fb92b2d34db56614b4542f
Reviewed-on: https://gerrit.libreoffice.org/27422
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-22 04:31:40 +00:00
Pranav Kant
f684e505da loolwsd: Restore test for convert-to API
This got accidently removed in
8e266391f1

Change-Id: I3d03b1b75f05f5855397e46a7fccc30c794ca151
2016-07-21 12:54:59 +05:30
Pranav Kant
483dbbc77e Revert "unit-admin: Enable a test"
This doesn't seem quite ready yet. Needs little bit more work
before we enable it again. From logs, it looks like 'rmdoc'
messgage is arriving really late.

This reverts commit e6e9236a6a.
2016-07-18 20:44:00 +05:30
Pranav Kant
e6e9236a6a unit-admin: Enable a test
testRmDocNotify was disabled earlier as it seemed to fail
intermittently. Hopefully, refactoring in
78876b011d2c3da972ef456a6da2cac08cb0d7d6 and
4360d31c9e8a3a099d869a9dfd0e2db8a0c03a52 should fix this one too.

Change-Id: I542ca27fab7eb4dfa8ed4a55a7f2eada63e7b96c
2016-07-18 12:03:27 +05:30
Pranav Kant
732c54313d loolwsd: Get rid of superfluous long list of fonts in test output
They make it difficult and annoying to analyze the test logs.

Change-Id: If970ab8296206e7462fe205a9b40cdf26a1eb37f
2016-07-14 10:59:36 +05:30
Pranav Kant
0f506fcbb0 Some more admin test cleaning
Change-Id: I3cea5b6fefcb7b4e6209c63e6b3e232b9db50a7b
2016-07-14 01:08:46 +05:30
Pranav Kant
4530bfdb0a loolwsd: Fix Admin unit test
Admin notify messages are emitted when websocket connection is
established, not when 'load' message is sent.

And, some minor cleaning.

Change-Id: If52a77c10c3af64dcca8d6c10868b3d46f48c774
2016-07-14 01:08:39 +05:30
Miklos Vajna
990108d243 test: make check insist on a log file for skipped tests 2016-07-11 09:22:47 +02:00
Miklos Vajna
9304c4152d HTTPWSTest: disable failing test on LO >= 5.2 for now 2016-07-11 09:22:47 +02:00
Henry Castro
adf4369237 loolwsd: test: state changed UNO commands 2016-07-10 14:28:28 -04:00
Miklos Vajna
3df68f3869 loolwsd: support CPPUNIT_TEST_NAME, similarly to core.git 2016-07-08 09:04:28 +02:00
Ashod Nakashian
64741ebb87 loolwsd: dump calc tile for debugging purposes
Change-Id: Ie2d92026fb77a4f94d6434ec25fc10695118971e
Reviewed-on: https://gerrit.libreoffice.org/27022
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-07 20:27:34 +00:00
Ashod Nakashian
2c4efeb5f3 loolwsd: fix PreFork test
We could have up to 3 pipes and we should tollerate them
when testing for leaking FDs and pipes.

The 3rd is probably a file redirection.

Change-Id: I913072307646e62e1802587c9142b2eb8c9dd7bb
Reviewed-on: https://gerrit.libreoffice.org/27021
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-07 20:27:18 +00:00
Ashod Nakashian
bb9168096d loolwsd: test fixes
Change-Id: I927bab6c88c72247a7bf6fb73ae56e1ebc51cdbd
Reviewed-on: https://gerrit.libreoffice.org/26993
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-07 03:50:16 +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
e8cd9e35d3 bccu#1909 - loolwsd command line options vs. config file and package upgrades
Unit tests updated with new command-line arguments.

Change-Id: I1a391255c44d4d22b8304129634ef7d16b606bce
Reviewed-on: https://gerrit.libreoffice.org/26683
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-26 20:45:12 +00:00
Mike Kaganski
47a17fa8d0 testCloseAfterClose: don't hang on bytes==0 && flags==0
At least in some versions of Poco (namely, 1.7.3),
WebSocketImpl::receiveBytes may return both bytes and flags equal
to zero. It makes the HTTPWSTest::testCloseAfterClose() loop
exit condition to never happen, thus test hangs.

According to WebSoket.h, "A return value of 0 means that the peer
has shut down or closed the connection".
Thus, this modification makes this loop robust.

Change-Id: I5dd4f30936dd8246c966f094f2fdae9a45b89ff9
Reviewed-on: https://gerrit.libreoffice.org/26547
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-21 23:07:35 +00:00
Ashod Nakashian
d1d9ec6168 loolwsd: max_concurrency setting added
Change-Id: Iae3789d26ed2e1aba3806a6f99511fa6c7097988
Reviewed-on: https://gerrit.libreoffice.org/26449
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-17 23:59:47 +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
75db2dd33b loolwsd: disable unit-fonts for now as it's unstable 2016-06-16 13:45:20 +02: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
Pranav Kant
257b95f01f bccu#1871: Add url prefix, lool, to post requests
All post requests will now have to be prefixed with /lool/

This is necessary to ease proxy url redirection setup.

Change-Id: I04fbc211879722f6433cb9eb17786f394187a1b9
Reviewed-on: https://gerrit.libreoffice.org/26091
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-06-09 11:22:05 +00:00
Pranav Kant
8cc367638f bccu#1871: Add url prefix to websocket urls
Normal websocket connections are now :
/lool/ws/filename

Admin websocket is now :
/lool/adminws/

Change-Id: If39382cb852d89ed0394adbd7fe168fe4767a075
Reviewed-on: https://gerrit.libreoffice.org/26029
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-06-08 14:06:20 +00:00
Miklos Vajna
f209773f0a loolwsd: fix naming style of static members
README suggests not using an initial underscore for those. Rename the
few cases which don't respect this recommendation.

Change-Id: If36a36da9374597f6b9090e7f81a1b3fb2f23647
2016-06-07 09:18:49 +02: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
Pranav Kant
3042580873 loolwsd: Increase timeout for admin test
... to 60 seconds. This one contains a lot of sub-tests. Further,
loolwsd shutdown is consuming approx. 15 seconds out of this
limit. The default 30 seconds, hence, is not enough for this one.

Change-Id: I0c29c92f6be0140cb62b58dacb57392e264d7f30
2016-06-01 21:58:07 +05:30
Pranav Kant
4c053e864f loolwsd: unit-admin: More debug info
Change-Id: I0a529915ab9383ce05a76b8291651663324c8fe8
2016-06-01 14:57:35 +05:30
Pranav Kant
b58801c6b0 loolwsd: unit-admin, log when test passes
Change-Id: I9714a8dc57b22ecff3ef4a421192d08a8f3f10e1
2016-06-01 14:57:35 +05:30
Henry Castro
58580a45ce loolwsd: test: update unit test getPartHashCodes 2016-05-30 20:26:40 -04:00
Henry Castro
39fe4e5580 loolwsd: test: add testFontList 2016-05-25 19:57:35 -04:00
Ashod Nakashian
dd4d2b026b loolwsd: test comment editing in Writer
Change-Id: I8449556960dedc2c66547016172acce688098cb3
(cherry picked from commit e96140b745283c0ae5e466001e0cf89cf945a398)
Reviewed-on: https://gerrit.libreoffice.org/25391
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-24 03:31:50 +00:00
Ashod Nakashian
d2ff39d296 loolwsd: test InsertAnnotation in Writer and Calc
Change-Id: I0f1b30467c3877316dc7c3122f04f3055b28cdd2
Reviewed-on: https://gerrit.libreoffice.org/25390
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-24 03:31:23 +00:00
Miklos Vajna
ffc8e591ee UnitPrefork: fix -Werror,-Winconsistent-missing-override
Change-Id: I16780cb0a15b662f735ee5ea17a4991e4bf460de
2016-05-23 09:07:52 +02:00
Ashod Nakashian
dcfa259b4e loolwsd: formatting
Change-Id: Id71a073c026ddea484fcb7da7d674109f3778c7c
Reviewed-on: https://gerrit.libreoffice.org/25346
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:57:56 +00: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
Henry Castro
166edb66eb loolwsd: test: move getDocSize to helpers 2016-05-22 18:52:36 -04:00
Ashod Nakashian
44a0e5785e loolwsd: cout -> cerr
Change-Id: I80ee313621ce093d75f2c331f3fef6125a187a42
Reviewed-on: https://gerrit.libreoffice.org/25263
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 15:53:11 +00: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
9347adc66f loolwsd: UnitPrefork can't use the more recent child
Change-Id: I6f60761498e61d9ceb48bc5f9a41967152293590
Reviewed-on: https://gerrit.libreoffice.org/25246
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 03:47:39 +00:00
Ashod Nakashian
5a0162f95c loolwsd: cleanup and improvements to UnitPrefork
Change-Id: I15394fa9199f0d2489a184d4c07602da02cbab64
Reviewed-on: https://gerrit.libreoffice.org/25245
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 03:43:45 +00:00
Ashod Nakashian
958f6ffcbd loolwsd: fix UnitPrefork deadlock/corruption
Reading from the socket in the test is not
thread-safe, and was causing all sorts of
problems.

The new code adds a test API and reads the
incoming data through it and not directly
from the socket. In addition, the read is
synchronized.

Change-Id: Id13821a40a59e32fd8a14f733a47306aee42ada8
Reviewed-on: https://gerrit.libreoffice.org/25244
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 03:43:15 +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
a0f16e6eef loolwsd: shorter lokit process counting interval and log count
Change-Id: I88d2dfd04f879d25d9e70d60f362ca47b39e8af9
Reviewed-on: https://gerrit.libreoffice.org/25009
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-15 14:34:46 +00:00
Ashod Nakashian
1eb239ee67 loolwsd: better editlock test
Change-Id: Ia0fa59b3b6b61bd054bd3d25f126884f4e5211b7
Reviewed-on: https://gerrit.libreoffice.org/25008
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-15 14:34:27 +00:00
Ashod Nakashian
d636cc1651 loolwsd: don't reset the expected loolkit count in crash test
Change-Id: I84da0eca6b7194f30cce94ea6332e17f821160ec
Reviewed-on: https://gerrit.libreoffice.org/25005
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-15 14:32:06 +00:00
Ashod Nakashian
66549a6872 loolwsd: improve testLargePaste
Change-Id: I789effb1b634c6cde04f936e1f1bc3a0a0868a69
Reviewed-on: https://gerrit.libreoffice.org/24991
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-14 13:29:59 +00:00
Ashod Nakashian
cf936a6515 loolwsd: remove redundant code and reuse helpers
Change-Id: I9bc007bba6acdc3462437fdcd3cfc931f94ddab1
Reviewed-on: https://gerrit.libreoffice.org/24990
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-14 13:29:14 +00:00
Ashod Nakashian
8c9fdace59 loolwsd: temporary documents are auto-removed on process exit
Change-Id: I8f24de216823ed3535810f93affabd4f2ce89eb6
Reviewed-on: https://gerrit.libreoffice.org/24989
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-14 13:28:36 +00:00
Ashod Nakashian
2726797cb7 loolwsd: improved loolkit process count tests
Test for kit process counts are ran before and
after each unit-test.

We expect 1 instance, not 0.

Renamed to follow static member rules.

Change-Id: Ibc1eabf10ffdb75ccaabbc9faff895b7fcc48c48
Reviewed-on: https://gerrit.libreoffice.org/24988
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-14 13:28:16 +00:00
Ashod Nakashian
75dd470d06 loolwsd: variable initialization
Change-Id: I0dbe0853f2b9bc4a4f69c2763a194766c0f6c616
Reviewed-on: https://gerrit.libreoffice.org/24987
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-14 13:27:43 +00:00
Ashod Nakashian
3cf2810ac2 loolwsd: improved testEditLock to minimize random failures and maximize checks
Change-Id: I8ae03d57c9f0f13ebf75122dc66ccdf5b756917d
Reviewed-on: https://gerrit.libreoffice.org/24969
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-13 12:58:39 +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
Ashod Nakashian
13469e45cb loolwsd: new check_valgrind target to run tests under valgrind
Change-Id: I1aa6d2f7435f4398111af09a4e9ddc6e300cf280
Reviewed-on: https://gerrit.libreoffice.org/24966
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-13 12:56:27 +00:00
Ashod Nakashian
925989c2c7 loolwsd: better crash tests
Change-Id: I41d6ae0c80d842ffb3a67f6e20376c0b10068ea5
Reviewed-on: https://gerrit.libreoffice.org/24936
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-12 15:31:25 +00:00
Ashod Nakashian
50b6381ff8 loolwsd: break socket reading on 0 bytes
Change-Id: I30af354684b26ea5e7dc494db6601fa6248febb9
Reviewed-on: https://gerrit.libreoffice.org/24935
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-12 15:26:16 +00:00
Henry Castro
f1c56d198a loolwsd: test: add test max col and row 2016-05-11 18:48:59 -04:00
Henry Castro
0f444af60d loolwsd: test: update sending "status" message 2016-05-11 01:22:57 -04:00
Henry Castro
947884e46a loolwsd: test: update testInactiveClient 2016-05-11 01:12:18 -04:00
Henry Castro
b3f5873d58 loolwsd: test: update loadDoc
loadDoc now test the first incoming status message
2016-05-11 01:07:14 -04:00
Henry Castro
4abc68bfb7 loolwsd: test: update loading views 2016-05-11 01:01:18 -04:00
Henry Castro
bd615ee9bc loolwsd: test: update isDocumentLoaded.
When loading a view, it just send the status messages, because
it is already loaded by main view id 0
2016-05-11 00:49:21 -04:00
Ashod Nakashian
9c2743144e loolwsd: variable initialization
Change-Id: I27c41c8d5c3f4cb555306a0da5a2475f93d5c49f
Reviewed-on: https://gerrit.libreoffice.org/24870
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-11 03:54:30 +00:00
Ashod Nakashian
14340097b8 loolwsd: break socket reading loop on error
Change-Id: I37ff42a3ccf4b495d0ecec9ea90bd8e12ddc4e8c
Reviewed-on: https://gerrit.libreoffice.org/24869
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-11 03:54:08 +00:00
Ashod Nakashian
1d90ed07f0 loolwsd: don't test for version in loleaflet as it's dynamic
Change-Id: I2488695d70cf0463b93671e3ca986808843f4447
Reviewed-on: https://gerrit.libreoffice.org/24868
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-11 03:53:47 +00:00
Ashod Nakashian
7c7d6c31cc loolwsd: refactored socket helpers
Change-Id: I9f6bca81f830d9a8f1726abbe29d9343bd41d666
Reviewed-on: https://gerrit.libreoffice.org/24867
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-11 03:53:28 +00:00
Ashod Nakashian
a4bfca2dd3 loolwsd: uninitialized variables
Change-Id: I2144c8f8ae9ad6298ba596faa504880b7c52256a
Reviewed-on: https://gerrit.libreoffice.org/24866
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-11 03:52:59 +00:00
Jan Holesovsky
ea082d6363 Use git hash for the loleaflet location instead of version. 2016-05-10 11:48:41 +02: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
b58b906f36 loolwsd: fix typo causing infinite recursion
Change-Id: I8a5ef2b65d3476a698d7dcf883ac8dc07e287533
Reviewed-on: https://gerrit.libreoffice.org/24788
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:31:55 +00:00
Ashod Nakashian
1ab1511a0e loolwsd: improved auto-save tests
Change-Id: If24b5e4cb585ffc59d31583cb10dfa3e57dc3056
Reviewed-on: https://gerrit.libreoffice.org/24787
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:31:02 +00:00
Ashod Nakashian
4cba61525c loolwsd: test notification replay on re-activation
Change-Id: I46471a2a3ecce219cf1b922aeebf0fdb02f66614
Reviewed-on: https://gerrit.libreoffice.org/24783
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:26:15 +00:00
Ashod Nakashian
b18246569d loolwsd: verify the number lokit instance before and after each test
Change-Id: Ia38475dc78ef5b4dc116a2d6f9791c7012985b5d
Reviewed-on: https://gerrit.libreoffice.org/24782
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:24:25 +00:00
Ashod Nakashian
b0843ba443 loolwsd: test helpers accept smart pointer WebSocket too
Change-Id: I83e62c7ce0daa6e44fb7f163607436640c9b9f08
Reviewed-on: https://gerrit.libreoffice.org/24781
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:22:43 +00:00
Ashod Nakashian
ce36141662 loolwsd: verify type before parsing part names/codes
Change-Id: Ib841167264d756850cb62e20f8a16a3ba147de37
Reviewed-on: https://gerrit.libreoffice.org/24763
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 13:08:53 +00:00
Ashod Nakashian
2829febd15 loolwsd: logging improvements
Change-Id: I5591e309ac9fbcbd79c816b26e65f51b77018bb2
Reviewed-on: https://gerrit.libreoffice.org/24748
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:36:00 +00:00
Ashod Nakashian
b3acb4001d loolwsd: add tests to validate Impress page changes
Validate the pages before/after insert/delete and
undo/redo operations.

Change-Id: I16aa14f022a8bb0a4b126ea9bc222b788dc7d2dc
Reviewed-on: https://gerrit.libreoffice.org/24747
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:33:27 +00:00
Ashod Nakashian
710134e1be loolwsd: cleanup Impress InsertDelete test
Change-Id: I9dfc5ee36797d0b6a8bff7b5c7e54007c6115bb0
Reviewed-on: https://gerrit.libreoffice.org/24746
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:32:34 +00:00
Ashod Nakashian
f02deef936 loolwsd: proper logging in Prefork Unit and other cleanups
Change-Id: I23017d3d34edb3608cfe8bc0b5c5eaa340231033
Reviewed-on: https://gerrit.libreoffice.org/24743
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:27:09 +00:00
Ashod Nakashian
641038ef47 loolwsd: noisy failure when test can't collect stats
Change-Id: I6a1693954d84d175478b08f3a49e07e9447e1517
Reviewed-on: https://gerrit.libreoffice.org/24742
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:26:36 +00:00
Ashod Nakashian
5c47a42fea loolwsd: handle socket errors in Prefork Unit
Change-Id: Idc5a2ea776e0b8f0cde43526d690468e1969e611
Reviewed-on: https://gerrit.libreoffice.org/24741
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:26:00 +00:00
Ashod Nakashian
4369cb1ff3 loolwsd: UnitPrefork times out while waiting on child to respond
This prevents deadlocking in case of test failure.

Change-Id: I3026311e9a67543a26acb0316546e6b5aacf61dc
Reviewed-on: https://gerrit.libreoffice.org/24738
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 04:18:36 +00:00
Henry Castro
e03d4f7b77 loolwsd: fix -Werror=shadow 2016-05-05 14:53:34 -04:00
Henry Castro
4d52c200c5 loolwsd: test: add testSlideShow 2016-05-04 16:19:47 -04: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
Jan Holesovsky
f40167cd6e Initialize the _url correctly. 2016-05-04 13:39:32 +02:00
Jan Holesovsky
191ee00f2c Run the tests on ports that do not conflict with a 'normal' loolwsd.
For the moment, it will allow running 'make check' that does not conflict with
an already running loolwsd (eg. from 'make run').  Later we can consider
running more tests in parallel.
2016-05-04 13:39:32 +02:00
Jan Holesovsky
f6f4681556 Use a separate client port for running the tests.
So that they can run in parallel to a 'production' loolwsd (like one from
'make run' or so) in the future; for the moment it is not possible, as the
MASTER_PORT is hardcoded.
2016-05-04 13:39:32 +02:00
Jan Holesovsky
4935bf14b4 LOOL_TEST_CLIENT_PORT env. var for overriding the client port in the tests.
And some further reduction of #ifdef ENABLE_SSL's...
2016-05-04 13:39:32 +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
2b02caa0b5 loolwsd: getResponseMessage that can return large binary payloads
Change-Id: Ie2cd3db5abdf00a04a6970825359095608fdb660
Reviewed-on: https://gerrit.libreoffice.org/24645
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:37:59 +00:00
Ashod Nakashian
a760c71ed6 loolwsd: tests should print progress and errors to cerr
Change-Id: I07341ef26de877b01f6dff0d8df81be4e1b4bed2
Reviewed-on: https://gerrit.libreoffice.org/24644
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-04 10:37:42 +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
Jan Holesovsky
b0af4bb3f9 Disable this test, it's unreliable.
For me, it is deadlocking - while we are waiting on the condition variable,
the tear down of the actual LOK / document is not progressing, because it is
waiting on something.

I was unable to get to the bottom of this in a reasonable time, so just
disabled the test for the moment; Ash is working on a similar problem I think,
so let's see if his solution helps here too (or can be applied the same way or
something).
2016-05-04 11:36:09 +02:00
Jan Holesovsky
030b59a5af Redirect stdout to the log too.
Without this, the unit-prefork gives unpredictable results depending on
whether the entire unit test run output is redirected to another logfile or
not (as then the stdout is inherited, and points to an unexpected place).

Maybe we should just exclude the fd 0, 1, 2 from the testing; but this is good
enough for now.
2016-05-03 14:51:40 +02:00
Tor Lillqvist
bfcf9756f5 Don't assert on PING frames that we send
UnitPrefork got what I assume is one of those PING frames that
ChildProcess::isAlive() sends before the actual reply when it sent the
"unit-memdump" message, and did not like it. Uncommenting the line
that outputs the "memory stats" message it expects showed:

Got memory stats 'PING'

Followed by:

Assertion `tokens.count() == 2' failed.

Fix by factoring out the handling of PING frames, PONG frames, and the
pseudo-PONG frames that we send ourselves in reply to PING frames into
a new function IoUtil::receiveFrame(). Use that in a couple of
places. (Probably should use in many more places.)

Getting past this then leads to later cppunit tests again being run,
and their failures then again showing up...
2016-05-03 09:50:38 +03:00
Ashod Nakashian
cf717152a7 loolwsd: bin_PROGRAMS -> noinst_PROGRAMS
Change-Id: Idfcfc9d21edafd094aa7c50b300b298e1ddfe6f5
Reviewed-on: https://gerrit.libreoffice.org/24598
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-02 23:54:50 +00:00
Jan Holesovsky
511b6c1039 Reduce #ifdef ENABLE_SSL's. 2016-05-02 18:41:57 +02:00