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
511b6c1039
Reduce #ifdef ENABLE_SSL's.
2016-05-02 18:41:57 +02:00
Ashod Nakashian
fd99834147
loolwsd: always run the lokit process count tests
...
Change-Id: I47365609850c23843624f714d6600f07629461ae
Reviewed-on: https://gerrit.libreoffice.org/24527
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-30 14:37:06 +00:00
Ashod Nakashian
4be73e5934
loolwsd: minor improvement to testing socket flags
...
Change-Id: I87d4d6a22fccef97bf69fce249ec0374db417714
Reviewed-on: https://gerrit.libreoffice.org/24502
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 21:20:11 +00:00
Jan Holesovsky
2b9295e8d7
countLoolKitProcesses() is more reliable here.
2016-04-29 22:02:21 +02:00
Ashod Nakashian
0e4c624f0b
loolwsd: minor improvement to test assertions
...
Change-Id: I40da725919ae775d039217c258ecd28a743b5bc1
Reviewed-on: https://gerrit.libreoffice.org/24484
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 03:40:13 +00:00
Ashod Nakashian
42a88e2362
loolwsd: fix load test regression
...
Change-Id: Icadd22306f61338698aedb1b6b5d4e02246d9a4e
Reviewed-on: https://gerrit.libreoffice.org/24482
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 03:39:22 +00:00
Ashod Nakashian
40d694d9ef
loolwsd: moved loolkit process counting to own file and minimized wait
...
Change-Id: Ib7950fe7d97ca3484aadb1d7a7492ad1a88e375a
Reviewed-on: https://gerrit.libreoffice.org/24478
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 03:36:49 +00:00
Ashod Nakashian
c164096c53
loolwsd: factored out common test helpers
...
Change-Id: Iad2794f1b458f04bdd1fb9d3f965afd91adbade8
Reviewed-on: https://gerrit.libreoffice.org/24477
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 03:36:00 +00:00
Ashod Nakashian
575e093076
loolwsd: editlock and takeedit tests
...
Change-Id: Ie2458aed1da0624f1769b6b75f134cb0fed0db75
Reviewed-on: https://gerrit.libreoffice.org/24475
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 01:09:24 +00:00
Ashod Nakashian
f44660aa99
loolwsd: unittest cleanups
...
Change-Id: Ib9b915c7ca2df03afba7f4e1fb37b8fff846a474
Reviewed-on: https://gerrit.libreoffice.org/24473
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 01:07:30 +00:00
Ashod Nakashian
cf54d0d87e
loolwsd: test helpers and more code sharing
...
Change-Id: I87e4ad23f9c2761a7a2acab4139b458696e07e64
Reviewed-on: https://gerrit.libreoffice.org/24468
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-28 22:20:10 +00:00
Henry Castro
49e6eb287b
loolwsd: test: fix wrong file name
2016-04-28 14:01:28 -04:00
Jan Holesovsky
7d2aaa8910
Log the exact test file that has been used.
2016-04-28 12:35:56 +02:00
Tor Lillqvist
2dde26c2ff
Add rant
2016-04-28 09:28:54 +03:00
Henry Castro
6378016586
loolwsd: test: add testClientPartCalc
2016-04-27 16:48:30 -04:00
Henry Castro
daa3d69f9e
loolwsd: test: update
2016-04-27 14:30:19 -04:00
Henry Castro
33eff1fe31
loolwsd: test: add testClientPartImpress
2016-04-27 13:51:23 -04:00
Tor Lillqvist
ee7f8c158a
Actually we want to check only for it starting with the expected string
...
As this assert fails at the moment (it did even before my previous
commit), I can't be 100% sure it is correct now. So sue me. Or revert
both my changes.
2016-04-27 14:19:01 +03:00
Tor Lillqvist
8480cad8ee
Use CPPUNIT_ASSERT_EQUAL
...
It is useful to see the expected and actual values when the assertion
fails.
2016-04-27 14:08:34 +03:00
Jan Holesovsky
f5abfcde68
Improve test to be able to see the message directly.
...
The test was unreliable, but any change there made it reliable, so not sure
yet what was the root cause - but at least this should help seeing the
brokeness once it appears again.
2016-04-26 11:54:20 +02:00
Tor Lillqvist
42dcd6ea99
Why log a string that we even expect to be junk?
...
WebSocket::receiveFrame() does not null-terminate the buffer even when
it successfully reads something into it, even less when it
doesn't. (Why would it, as it is perferctly fine to transmit WebSocket
(binary) frames that contain zero bytes.) So the 'received' string was
always full of random bytes.
2016-04-26 08:20:59 +03:00
Henry Castro
8ea127407b
loolwsd: test: replace std::regex
2016-04-25 18:07:55 -04:00
Miklos Vajna
9ea85e8d1a
httpwstest: fix -Werror,-Wshadow
...
Change-Id: I64482d921409e291f6f60bf7d963a516ba4e7550
2016-04-25 09:22:41 +02:00
Tor Lillqvist
53de1935e3
Remove accidentally (?) committed commented-out line
2016-04-25 08:13:48 +03:00
Ashod Nakashian
afc152b0ce
loolwsd: compiler fixes in the tests
...
GCC 5.x doesn't allow temporary strings in regex_match.
Change-Id: I4c62872661d6b78ce7e949cf524c7b2b36fb0197
Reviewed-on: https://gerrit.libreoffice.org/24357
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-25 02:14:30 +00:00
Henry Castro
9720ea3781
loolwsd: test: add testParams
2016-04-24 21:00:44 -04:00
Henry Castro
05d9e5ae0c
loolwsd: test: update testInsertDelete
2016-04-24 15:00:21 -04:00
Tor Lillqvist
b0cfa35018
Remove accidental superfluous indentation
2016-04-22 13:26:32 +03:00
Tor Lillqvist
232499f542
Add test that simultaneously requested tiles indeed were rendered just once
...
This test requires the renderid parameter to be present in the 'tile:'
response messages, and that is the case only when ENABLE_DEBUG, so we
can run the test only in a debug build.
2016-04-21 12:50:24 +03:00
Henry Castro
c29944a386
loolwsd: fix close after close
...
The closing handshake.
Either peer can send a control frame with data containing
a specified control sequence to begin the closing handshake.
Upon receiving such a frame, the other peer sends a
Close frame in response, if it hasn't already sent one.
2016-04-18 20:27:27 -04:00
Tor Lillqvist
311a748d45
Clean up jails of exited loolkit processes sooner
...
In loolforkit, whenever we have forked a new loolkit, also check if
any previously forked children have exited. Remove the jails of
those. (The loolkit process itself does not even try to remove all of
its jail, see 3aadd910c6e32c0e557671effa5a4c606cd6e8bf.)
In order to be able to notice exited child processes in loolforkit, we
no longer can set the action for SIGCHLD to SIG_IGN. That means that
exiting loolkit processes will be in the zombie state until loolforkit
picks up their exit status. As loolforkit does this check only in
connection with forking a new child, zombie loolkit processes will
hang around for some time, until the next loolkit process is
forked. Not sure if this is a problem.
countLoolKitProcesses() in httpwstest now needs to skip zombies.
Loolwsd still takes care of removing whatever jails are left when it
finishes.
2016-04-18 14:30:09 +03:00
Ashod Nakashian
385359824a
loolwsd: unittest to validate correct doc reloading while unloading
...
Change-Id: Id956fc9e243c44ecd3914b448ab92f87e011d3ee
Reviewed-on: https://gerrit.libreoffice.org/24185
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-18 03:37:54 +00:00
Ashod Nakashian
53a2e3ba42
loolwsd: save on disconnection test enabled and functional
...
Change-Id: I604b0826674e981136ca7f8a9169a20eed9597d3
Reviewed-on: https://gerrit.libreoffice.org/24181
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-18 03:34:10 +00:00
Ashod Nakashian
2ee7d35fb8
loolwsd: reload test now actually reloads same document
...
Change-Id: I2ff724d3a3566f5fcb010ce46a6749e517afccd2
Reviewed-on: https://gerrit.libreoffice.org/24180
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-18 03:33:41 +00:00
Ashod Nakashian
8b5d702acb
loolwsd: testBadRequest actually provokes connection error
...
Change-Id: Ibf12b6b45d6eb34e031ab689983ab3599a58caef
Reviewed-on: https://gerrit.libreoffice.org/24162
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-17 15:27:00 +00:00
Henry Castro
0a92e02339
loolwsd: test: update changes to WebSocketErrorMessageException
2016-04-17 08:42:07 -04:00
Henry Castro
a66e73aeb0
loolwsd: fail when document broker cannot get a child
2016-04-16 13:32:44 -04:00
Tor Lillqvist
947f8bcf13
Test number of loolkit processes also before and after the HTTPPostTest suite
2016-04-15 17:13:47 +03:00
Tor Lillqvist
5c41d4c5ed
-Werror=maybe-uninitialized
2016-04-15 10:53:06 +03:00
Henry Castro
39180a0e22
loolwsd: test: add connectLOKit
...
Connecting to a Kit process is managed by document broker, that it does several
jobs to establish the bridge connection between the Client and Kit process,
The result, it is mostly time outs to get messages in the unit test and it could fail.
connectLOKit ensures the websocket is connected to a kit process.
2016-04-14 21:54:36 -04:00
Henry Castro
bea5963aa7
loolwsd: avoid time out exception
2016-04-14 12:00:32 -04:00
Tor Lillqvist
066b48688a
Use the 'expected' and 'actual' parameters of CPPUNIT_ASSERT_EQUAL() correctly
2016-04-14 17:07:55 +03:00
Tor Lillqvist
2edf15a18b
Use CPPUNIT_ASSERT_EQUAL() to get expected and actual values into output
2016-04-14 17:05:09 +03:00
Tor Lillqvist
0140b1cd43
Always define ENABLE_DEBUG and _SSL in config.h, as 1 or 0
...
Correspondingly always use #if, not #ifdef, to test.
2016-04-14 13:43:31 +03:00
Henry Castro
096f7db6d0
loolwsd: report indicator status before websocket is ready
2016-04-13 14:42:46 -04:00
Tor Lillqvist
e5de11113b
Don't check for or send "disconnect" frames anywhere and don't document them
...
Follow-up to 68b3a2c81e
.
2016-04-13 15:49:10 +03:00
Tor Lillqvist
db14143d72
Make the loolkit process counting more reliable
...
Sleep in both places before counting them, and catch Poco exceptions
while counting (can happen for instance when a /proc entry goes away
while we are looking for its 'comm' file).
2016-04-13 15:33:56 +03:00
Tor Lillqvist
726fd1f66d
The CPPUNIT_TESTs I added a moment ago should be first and last in the list
2016-04-13 13:22:35 +03:00
Tor Lillqvist
00660cfe3d
Sort #includes
2016-04-13 13:19:26 +03:00