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
Jan Holesovsky
e2be97f14a
Centralize the server URI.
2016-05-02 18:25:58 +02:00
Jan Holesovsky
c3cb14d258
Centralize the server URI.
2016-05-02 18:19:08 +02:00
Jan Holesovsky
b3dd2f31f9
Update the gdb command to match reality.
2016-05-02 15:03:16 +02:00
Jan Holesovsky
9df5ccc517
Make this unit test running without SSL too.
2016-05-02 15:03:16 +02: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
Ashod Nakashian
b916543eef
loolwsd: tests can be built with running using 'make'
...
Indeed, tests are built when invoking make in loolwsd
directory, thereby helping catch build errors in test
before committing.
Change-Id: I34cffcb5d0aed6485e578cf20f64217bee337d23
Reviewed-on: https://gerrit.libreoffice.org/24573
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-01 17:17:46 +00:00
Ashod Nakashian
461fd40b49
loolwsd: more support for TileCache unittest
...
Change-Id: I7b09fdde8179c855bbb1545f3a2188be1c929d20
Reviewed-on: https://gerrit.libreoffice.org/24571
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-01 17:17:05 +00:00
Ashod Nakashian
d16f44d7a2
loolwsd: TileCache unittest, hooks, and events
...
Change-Id: Id9e0539d2f920f15b0d0cb8e5924e480ed6d1e87
Reviewed-on: https://gerrit.libreoffice.org/24570
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-01 17:16:31 +00:00
Michael Meeks
012593e375
Unit test cleanups.
2016-04-30 18:15:50 +01:00
Ashod Nakashian
59b475570d
loolwsd: no need to sleep before running tests
...
Since lokit process counting waits until WSD
is ready (i.e. until it has created lokit processes,)
there is no need to sleep explicitly anymore.
Provided, of course, we always call the lokit
process counter before running any tests, which we
currently do.
Change-Id: Idf7ad925688251f1c81ef8628530714d2dc92d9c
Reviewed-on: https://gerrit.libreoffice.org/24528
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-30 14:37:36 +00: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
Ashod Nakashian
a007a7c1d4
loolwsd: improved LoKit process counting
...
Change-Id: I514ece4ce7f401a8996bc115ab00ddb7a8bec90d
Reviewed-on: https://gerrit.libreoffice.org/24501
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 21:19:46 +00:00
Jan Holesovsky
2b9295e8d7
countLoolKitProcesses() is more reliable here.
2016-04-29 22:02:21 +02:00
Jan Holesovsky
ce691601dd
Need a longer default timeout for the httpwstest.cpp.
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
472f959bec
loolwsd: more sharing of common test code
...
Change-Id: Id49118eb38633127327fc16e5f49137255e78425
Reviewed-on: https://gerrit.libreoffice.org/24481
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 03:38:53 +00:00
Ashod Nakashian
c6380f5820
loolwsd: test logging cleanup
...
Change-Id: Ie2fa40eab6fec4cfe9819d75f1c35efd835b11b7
Reviewed-on: https://gerrit.libreoffice.org/24480
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 03:37:51 +00:00
Ashod Nakashian
7f17561f7a
loolwsd: test SocketProcessor supports timeout
...
Change-Id: I1cf277c67840f35a0f79884c9b1c644b0769b5fd
Reviewed-on: https://gerrit.libreoffice.org/24479
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-29 03:37:20 +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
407b41afb9
Decrease verbosity of this the http server test.
...
And also check that we've had a hit in loleaflet.html.
2016-04-28 18:35:22 +02:00
Jan Holesovsky
28b7aee356
No need for a standalone httptestutils.hpp any more.
2016-04-28 18:17:37 +02:00
Jan Holesovsky
8e266391f1
Merge the http get and post tests into one file, and reduce copy/paste.
2016-04-28 18:08:07 +02:00
Jan Holesovsky
f283b045a9
The http tests are actually integration tests, not unit tests.
2016-04-28 17:45:18 +02: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
Jan Holesovsky
2f561802b3
The branding files do not have to be present, skip them.
...
Clean up tons of copy'n'paste when at that...
2016-04-26 11:32:01 +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
47917fb8c9
loolwsd: test: add testLinks
2016-04-25 21:40:24 -04:00
Henry Castro
7317345a2b
loolwsd: test: add testScripts
2016-04-25 21:01:46 -04:00
Henry Castro
8ea127407b
loolwsd: test: replace std::regex
2016-04-25 18:07:55 -04:00
Michael Meeks
dc035c83b7
Unit test to catch / avoid unexpected inherited sockets.
2016-04-25 21:09:57 +01:00
Miklos Vajna
9ea85e8d1a
httpwstest: fix -Werror,-Wshadow
...
Change-Id: I64482d921409e291f6f60bf7d963a516ba4e7550
2016-04-25 09:22:41 +02:00
Tor Lillqvist
246e341c66
There is a kill() system call
2016-04-25 09:25:23 +03:00
Tor Lillqvist
ada503d91e
Bin unused variable
2016-04-25 09:15:25 +03:00
Tor Lillqvist
dcbb5eab33
Hmm, probably should remove all those commmented-out lines for consistency then
...
If there in fact was some good reason to have them, it is trivial to
add them back (with a comment telling why they are useful, thanks).
2016-04-25 08:25:32 +03: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
e06cf8ac16
loolwsd: test: add testLOleaflet
2016-04-24 16:41:51 -04:00
Henry Castro
05d9e5ae0c
loolwsd: test: update testInsertDelete
2016-04-24 15:00:21 -04:00
Ashod Nakashian
56cf69c47f
loolwsd: unittest to kill all children before loading
...
Change-Id: I90f28b792c56b9659c04bcc89042455a8a37b8fa
Reviewed-on: https://gerrit.libreoffice.org/24337
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-24 17:01:44 +00:00
Ashod Nakashian
bb8beee8e9
loolwsd: refactored killing of LoKit processes in unittests
...
Change-Id: Ia41adc977252049b1cd7d8936f0c4c8380516030
Reviewed-on: https://gerrit.libreoffice.org/24336
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-24 17:00:40 +00:00
Ashod Nakashian
48bdc1e97a
loolwsd: silence unused-result gcc error
...
Change-Id: Ide71b0b585a2b822cedc93e0b4aae11ab4aa1b34
Reviewed-on: https://gerrit.libreoffice.org/24333
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-24 16:55:29 +00: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
40daf0185a
loolwsd: test: discovery
2016-04-20 23:09:04 -04:00
Henry Castro
11fbb33b56
loolwsd: test: simulate lokit crash test
2016-04-20 21:14:51 -04:00
Michael Meeks
a47355db2f
Expand use of the TileBeingRendered structure.
...
Implement this for tilecombine, and do tile writes in each client's
thread separately. Add env-var. to trigger sleep, and tune it to 1
second; easily long enough to exercise this code-path.
2016-04-20 11:14:18 +01:00
Tor Lillqvist
f825fea9db
operator '?:' has lower precedence than '+'; '+' will be evaluated first
2016-04-19 16:21:55 +03:00
Pranav Kant
3e93a212f0
loolwsd: Admin console unit tests
...
Change-Id: Id0baa51c2adb14b77080b5acd2abf0658ee54b2b
2016-04-19 14:40:03 +05:30
Ashod Nakashian
3878f3b515
loolwsd: initialization and resetting support in RegexListMatcher
...
Change-Id: Ic262cf9e4a21d30b6dfd9d9fc0d895f89d7d8e7b
Reviewed-on: https://gerrit.libreoffice.org/24232
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-19 01:41:00 +00:00
Ashod Nakashian
7d65e30595
loolwsd: regex matching class against whitelist/blacklist
...
With unittests.
Change-Id: Ibb14c493cc6de61b6497ab84e34e105481afe464
Reviewed-on: https://gerrit.libreoffice.org/24231
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-19 01:40:37 +00: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
Ashod Nakashian
a70c5300b1
loolwsd: childConnected event added to UnitWSD
...
Change-Id: I3d19465229b434d07f50290f08462e9c9c66a6ca
Reviewed-on: https://gerrit.libreoffice.org/24160
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-17 15:26:09 +00:00
Ashod Nakashian
0cf179ba57
loolwsd: run_unit.sh now finds abs_top_builddir and executes using bash
...
Change-Id: I3a341f5508ecf4cda51cc526d38d09cdbcaf09ff
Reviewed-on: https://gerrit.libreoffice.org/24157
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-17 15:20:43 +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
Michael Meeks
69816395d5
Re-enable verbose tracing during unit testing.
2016-04-15 22:04:15 +01:00
Michael Meeks
65ee749ce1
Move new unit tests to custom test driver.
...
Cleaner, and avoids bogus warnings during compile.
Merge run_test.sh.in into a mode of run_unit.sh - gives the
chance for nice debug output etc.
2016-04-15 21:52:39 +01:00
Tor Lillqvist
947f8bcf13
Test number of loolkit processes also before and after the HTTPPostTest suite
2016-04-15 17:13:47 +03:00
Michael Meeks
a49f642801
Tolerate --version, and add git hash version, print on default start.
...
Should help diagnosing issues - to have this in our logs.
2016-04-15 15:07:24 +01: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
Michael Meeks
53c60b2842
Magic to cleanup autotools module linking of unit tests.
2016-04-14 18:58:18 +01: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
Andras Timar
b3e610eba0
loolwsd: do not install unit test shared libs
2016-04-14 14:43:31 +02: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
Jan Holesovsky
1e58864230
Revert unwanted change of hello.odt, and prevent that from happening again.
2016-04-14 11:40:17 +02:00
Michael Meeks
b3f17462eb
Fix ENABLE_SSL AC_SUBST.
2016-04-14 09:34:52 +01:00
Michael Meeks
35b27b352c
Initial font unit test.
2016-04-14 09:34:52 +01:00
Henry Castro
096f7db6d0
loolwsd: report indicator status before websocket is ready
2016-04-13 14:42:46 -04:00
Jan Holesovsky
efb67d68fd
The host= parameter for loleaflet.html does not exist any more.
...
Now loolwsd fills that in directly.
Also show http:// or https:// in 'make run' according to the configuration.
2016-04-13 18:42:07 +02:00
Jan Holesovsky
b09b6eab89
Only the access_token (and _ttl) is supposed to be passed via the form post.
2016-04-13 18:32:00 +02:00
Michael Meeks
1eb92c0dc9
Cleanup and aggregate memory stats.
2016-04-13 14:35:30 +01: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
Tor Lillqvist
b4ae5192bb
bccu#1678: Add cppunit test that no extra loolkit processes are left over
...
The number of loolkit processes after running the cppunit tests should
be the same as before running them. (At least, that is the intention
at the moment, I think. If/when this changes, the test will have to be
adapted, of course.)
2016-04-13 13:17:43 +03:00
Tor Lillqvist
8f3ec463b8
Change some cppunit assertion messages to match what is actually being asserted
...
If you can't come up with a meaningful message to use in a
CPPUNIT_ASSERT_MESSAGE(), just use CPPUNIT_ASSERT() instead. These
messages aren't intended for end-users but for developers, so it is
pointless to make them high-level and dumbed-down.
2016-04-13 09:58:18 +03:00