Commit graph

123 commits

Author SHA1 Message Date
Michael Meeks
8c6720cb5a Unit test for &lang=es-419 style code, disliked by boost gettext.
Change-Id: I2f1c39d03d61ef2074fe6e946a79fc2f07ffd27b
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-03-02 16:26:36 +00:00
Ashod Nakashian
52f2600cf9 wsd: test: embue all tests with a name and unify logs
Now the remaining tests that didn't have a name
get one and the logs are unified between old-
and new-style tests. Mostly.

This makes sure that all logs and assertions
properly log the test name and make test
failures easier to debug and fix.

Change-Id: Id159ffacc81642a6ec594c5143498408adab67cf
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-17 18:52:48 -05:00
Ashod Nakashian
3d04a857bd wsd: test: improved and simplify test logging
Build-time unit-test output is now only
displayed when the test fails. This is to
reduce noise while building when not helpful.

Change-Id: I273d97dae192a24e9a1ae9f662b0fcd7ff555b75
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-17 18:52:48 -05:00
Andras Timar
f07ff8c7e0 rename: remaining lool->cool changes
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib7d4e804bebe52dead8d53b0e0bbaed0f08bf3d0
2021-11-18 14:14:11 +01:00
Michael Meeks
b043b6213d Move LOOLWebSocket into test/ - where it can be slowly removed.
Change-Id: I388690261d323377648a1502b927e73f862ad802
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-10-11 13:40:20 +01:00
Ashod Nakashian
b47c81e7a8 wsd: improved WebSocketSession interface
SocketPoll is captured as weak_ptr into
WebSocketSession and a much better shutdown
support is now available. The new logic
can do async-shutdown after flushing and
will do sync-shutdown if SocketPoll is
no longer around.

Change-Id: Ia206cab58a13f20f7aeb3a6d8c57afee731c8231
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
4f9d029bde wsd: test: killpoco web-sockets in httpwstest
Change-Id: Ic0b577693abb10dca0dcc9df75fa28943daa5cdf
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-27 08:09:49 -04:00
Ashod Nakashian
4333845728 wsd: test: killpoco in httpwstest
Change-Id: Ief228862d882ae96650708e30442693cc127f0c9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-12 09:06:38 -04:00
Ashod Nakashian
0b6eec8234 wsd: test: killpoco in httpwstest
Change-Id: Ief228862d882ae96650708e30442693cc127f0c9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-11 18:43:36 -04:00
Andras Timar
0002fdfd6c fix license headers
Change-Id: I8623770b32d278a45357dc7f757fabfadd2b4af7
2020-10-01 11:56:43 +02:00
Ashod Nakashian
82560d9657 wsd: test assertion macros
Because the new-style tests are intrustive,
the exception that CppUnit throws on assertion
failures is caught and processed with the
application logic, which is far from ideal,
because it's very difficult to find the
cause of failure.

What we'd like is a way to control what happens
when an test assertion fails, such that we can
properly log/print the failure, and even break
in the debugger.

The new macros allow us to control the behavior
at compile-time and have added flexibility.
For now, they log an assertion failure before
invoking the CPPUNIT macro, and support a
compile-time directive to assert, which is
useful for breaking in the debugger.

Change-Id: If464ba246e3ec747f31496a4215cb73ef735dfaf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87625
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-03-14 15:45:00 +01:00
Miklos Vajna
7214fe1634 Restore "tests: Disable unstable unit test."
This restores commit 5c8a224e2d, which
disabled the unstable testReloadWhileDisconnecting testcase. Later this
was reverted by commit 4fc7bc76db, but
nothing was really done to improve the stability, so go back to disabled
for now. (Till somebody has time to debug & fix the root cause here.)

Change-Id: I26ea40a81cf9e2673f2397221c85e6f9dedc4052
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88669
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-14 09:59:23 +01:00
Tamás Zolnai
4fc7bc76db tests: Change the order of cypress-test and other tests.
So we can see how stable the cypress tests are. Now other unit
tests under tests folder are failing randomly, so it's hard to
monitor the cypress tests.

Enable one unstable unit test, which was disabled for the same
reason.

Change-Id: Ib1646de1647c9a2bdb769bbb6b92a5794dd7a598
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88559
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-12 22:46:34 +01:00
Tamás Zolnai
5c8a224e2d tests: Disable unstable unit test.
Half of the Jenkins build fails beacuse of this test.

Error message, we've got during run:
uncaught exception of type std::exception (or derived).
- error: cmd=storage kind=loadfailed

Change-Id: I42bb502a5aac96218b4ca772c1d0def398144797
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88443
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-11 14:56:30 +01:00
Miklos Vajna
743edbc9e8 Convert some closing tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I5abaf6a5be4e21167fb1248c8c23dbc3b94c4303
Reviewed-on: https://gerrit.libreoffice.org/85573
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-20 09:46:47 +01:00
Miklos Vajna
9680084f6b Convert some insert/delete tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I4938d00337dead52345036f7b186f5a759f26b82
Reviewed-on: https://gerrit.libreoffice.org/85427
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-18 22:18:08 +01:00
Miklos Vajna
b5f78fe73d Convert some Calc tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Also, in UnitLoad, give up on trying to avoid the sleep after
disconnecting, it seems the old condition was not reliable.

Change-Id: I972a3319887a70eeea2585104ed1e762830ca505
2019-12-06 08:51:51 +01:00
Miklos Vajna
fe04d685db Convert cursor tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I0fb1e798875c479e0aeb5f709ef630def5349126
2019-12-02 09:11:39 +01:00
Miklos Vajna
0580f51f85 Convert doc load tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I2dcef46ec76e1f971172d1c29adf09103cfeaa7b
2019-11-22 09:07:33 +01:00
Miklos Vajna
703eb28a97 Convert "uno command" tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I79eaa8014deda25ae31b0ad5ff38a8023ef0ae3e
2019-11-18 08:56:41 +01:00
Miklos Vajna
ee61bc6fb8 Convert "client session" tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: Ia95b077b46538788c0bbc7cafebfd9019512d2ab
2019-11-14 08:40:59 +01:00
Miklos Vajna
4e43c5bbaf test: remove duplicate HTTPWSTest::testPaste()
This was originally moved in commit
b97789eb76 (Convert paste testcase to a
new-style one, 2019-10-18), then
194db8ed45 (test: improve stability of a
number of tests, 2019-10-12) restored a duplicate of this, probably due
to a mismerge.

Change-Id: Ie76266ddb85c58bb2370640025b91af980656908
2019-11-13 09:03:09 +01:00
Miklos Vajna
3cf185a576 Convert "each view" tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: Ia16009f6047acdba531a7bfc50419dfb8ad0ca29
2019-11-12 08:47:47 +01:00
Miklos Vajna
6e3d8005eb Fix HTTPWSTest::testExcelLoad() to pass again
Assuming that the test has to be adapted, and it's not like it caught
real badness.

Change-Id: Id0e6bc134aefdeb46d281ae6b2a5fbc9ae70e8a4
Reviewed-on: https://gerrit.libreoffice.org/82414
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-11 08:54:56 +01:00
Jan Holesovsky
d906c78198 killpoco: Remove POCO from Protocol.cpp + related StringTokenizer usage.
Change-Id: I9d93c03dde110a4e88f7ec86e5934916596a27c1
Reviewed-on: https://gerrit.libreoffice.org/82301
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-08 22:20:58 +01:00
Miklos Vajna
cd75e2c5f4 Convert render shape tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I4acbfaa32f6c771d860c0ff2782024b176690ee5
2019-11-04 08:34:44 +01:00
Michael Meeks
74c4cf1161 Fix mis-merge around testLargePaste.
Change-Id: I2a24219a54a9b454ef5c5de558046a9bcc993873
2019-10-29 09:36:25 +00:00
Ashod Nakashian
c82760f103 test: improve TileCache tests
This fixes up some minor issues, improves stability
and logging of tests.

Reviewed-on: https://gerrit.libreoffice.org/81259
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit a6e2dff35a4f1234066c66cb64f7e3bcd034ed58)

Change-Id: I906922c1c74427a53f9017f7be73c1f85ecf4cd7
Reviewed-on: https://gerrit.libreoffice.org/81575
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-10-29 02:32:54 +01:00
Ashod Nakashian
c3bd1b8bf6 test: improve HTTPWSTest::testUndoConflict
Failure rate is now reduced.

Change-Id: I46c26582126c7dba2a3fc86dbbf6ec5f12aa740f
Reviewed-on: https://gerrit.libreoffice.org/81197
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit a12092c85d3b8e8e3b3c54b0eabb6bd3725b9542)
Reviewed-on: https://gerrit.libreoffice.org/81573
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-10-29 02:32:22 +01:00
Ashod Nakashian
d6306c5388 test: improve getAllText to match an expected payload
Change-Id: I4159f1e21f581ccdf90bcacf489580c8887931e5
Reviewed-on: https://gerrit.libreoffice.org/81195
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 9903229918d07eee2f6c1ad22ee5a287f4fd0884)
Reviewed-on: https://gerrit.libreoffice.org/81571
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-10-29 02:31:01 +01:00
Ashod Nakashian
10ffdc1e4a testSaveOnDisconnect: sync after pasting and better logging
Reviewed-on: https://gerrit.libreoffice.org/80898
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 230fcd2f07192f30fb6d6671d905800fde71495e)

Change-Id: Iaacbe0bdc6a7ba88d2f09c343d9579315033acbb
Reviewed-on: https://gerrit.libreoffice.org/81569
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-10-29 01:43:17 +01:00
Ashod Nakashian
194db8ed45 test: improve stability of a number of tests
There are numerous race conditions between issuing
action and getting the events. This causes a
mismatch, such that the events from SelectAll
is received when waiting for the events for a
subsequent action (say, Delete).

To make matters worse, sometimes Core issues
an invalidation whilst sending the events for
an action, and this completely messes our
accounting of what events we expect.

This latter could also be an issue with real
clients, however it's less likely to be
disruptive. Still, it is possible that
the client doesn't get key events
because Core had a hiccup, which breaks
the tests.

For the tests at least, the solution is to
re-issue the last action, such that we make
sure that we move forward only when the correct
event is received, or we timeout waiting.

The end results is that tests now don't fail
nearly as often as they used to.

Reviewed-on: https://gerrit.libreoffice.org/80894
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 050403daf04d6b36ef850006ba4a15eab6be9afc)

Change-Id: Ib1a658846061990649987ca083915a49c1fb092a
Reviewed-on: https://gerrit.libreoffice.org/81565
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-10-29 01:41:00 +01:00
Ashod Nakashian
923030470c test: improve SVG parser
The SVG can have self-closing tags, which wasn't accounted
for. This meant the actual SVG didn't match the expected.

Reviewed-on: https://gerrit.libreoffice.org/80895
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 93abce99d02aa417feeae12f9232b0be83a74e35)

Change-Id: I749ba7f59351cf635fdc1cd30b3be5260b3c6b16
Reviewed-on: https://gerrit.libreoffice.org/81566
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-28 10:54:14 +01:00
Miklos Vajna
cf19ee6ce5 Convert password protected test to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: Ie57d028314fec1994f603097cf408cbda2fee8f4
2019-10-28 09:12:32 +01:00
Miklos Vajna
cdec2c7870 Convert rendering options to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I817812eaeaffea4de8bb3a90466d815d4047372c
2019-10-25 08:54:46 +02:00
Miklos Vajna
1bff9e7bf8 Convert load torture testcase to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I6b33887fbe8dd6071ee767f24d4776a694fb62f7
2019-10-21 09:04:12 +02:00
Miklos Vajna
b97789eb76 Convert paste testcase to a new-style one
Change-Id: Ie4d8c2431bc12b94af83b802d4a627cbfb7a72e0
2019-10-18 09:06:53 +02:00
mert
a5000034cd Added normalizedViewId to the tests with tilemsg
Change-Id: I479246a2c592b7e4f50b613a0fb0f96af761198c
2019-10-15 18:13:03 +03:00
Andras Timar
d1ae1b36c2 typo fixes in comments and code
Change-Id: Idd98516d30d98dea18eda9bbec8ac9777063b553
2019-10-08 11:49:45 +02:00
Miklos Vajna
a6eff7ed2d Convert large paste testcase to a new-style one
And fix run_unit.sh to to do the quoting properly, so -la does not match
the \.la pattern.

Change-Id: I6fd81166abc43f87d82123c104ee4e74238bd714
2019-10-08 08:51:03 +02:00
Miklos Vajna
08f5d74f63 Convert TIFF load testcase to a new-style one
This was originally added in commit
c2c7982e5e (Add TIFF load testcase,
2019-07-04), and still fails without the core.git fix.

Change-Id: I798b82ea8212dfeafc162e4b73f6fff707ac3de2
2019-09-12 23:10:04 +02:00
Tomaž Vajngerl
0189fb10fb fix HTTPWSTest::testInactiveClient test failure
Change-Id: I0974e289ecb48354fbc038dafe92b74da38fb25c
2019-09-07 19:15:09 +02:00
Andras Timar
69140fcdbb CPPUNIT_ASSERT_GREATEREQUAL is not available in cppunit of older distros
Change-Id: I37001791e05df9a55c25b48fff3bbe5d6bd050e2
2019-09-05 23:02:18 +02:00
Miklos Vajna
1b27ed045d Fix TileCacheTests::testClientPartImpress()
After commit 8e118889cb (wsd: leaflet:
support statusupdate: messages to sync clients, 2019-08-17), which added
a new hiddenparts= key, but forgot to adapt tests accordingly.

Change-Id: Ia5baefff37b88f5b173d65ae80a126f94b420cb0
2019-08-22 09:06:02 +02:00
Miklos Vajna
773080eb74 Fix failing HTTPWSTest::testInactiveClient()
It seems to me that in this case the test was poor, if other
invalidation types are expected, then this one should be fine, too.

Change-Id: Iae7597eef081acdfb5d6f9152747204a71bd2b66
2019-08-02 09:35:20 +02:00
Miklos Vajna
c2c7982e5e Add TIFF load testcase
Fails with core.git commit ad8f4c4432e0c5c052b6f87977d1ad8663debe09 (vcl
lok: pre-load graphic libraries, 2019-07-04) reverted, which fixed TIFF
loading in the preload case (running in a chroot, no code available in
the chroot).

Change-Id: Ic46da0abcb13c4dd6fc1ce697b93e0b3062077d7
2019-07-04 17:57:01 +02:00
Miklos Vajna
1d32dc1742 Fix HTTPWSTest::testRenderShapeSelectionImpress() against product core
This test only passed when core.git was built in a way so that '#if
OSL_DEBUG_LEVEL > 0' was true (debug, dbgutil builds). Re-generate this
against a product build, since 2 other tests already have references
like that.

We already have infrastructure for stripping <desc> XML elements from
the actual result.

Change-Id: I9cdd53bf9625266d94313a90946270bfc266bd47
2019-05-09 14:25:21 +02:00
Miklos Vajna
aa5b28ceb0 test: fix HTTPWSTest::testRenderShapeSelectionWriterImage() failure with ...
... debug core.git. Same problem, need to filter out <desc> XML
elements.

Change-Id: I84973b831508e6a073d9c75868307d98a2ada370
2019-05-09 10:40:25 +02:00
Miklos Vajna
0fbabb7a22 test: fix HTTPWSTest::testRenderShapeSelectionWriter() failure with ...
... debug core.git.

SVGActionWriter::ImplWriteActions() in core.git writes additional <desc>
XML elements, guarded with a '#if OSL_DEBUG_LEVEL > 0' block.

Filter these out, so the reference SVG will match both product and debug
builds.

Change-Id: Iba3fb25af206c70d5a4ff5801a934dcfd74704de
2019-05-09 10:30:11 +02:00
Michael Meeks
5406a25b24 tests: make SVG comparison tests much more helpful.
Dump the SVG we actually get as a .new file for easy upgrade and
comparison on mismatch.

Change-Id: I607a97ff27a9bf480524efc31877e46d74c5ee3d
Reviewed-on: https://gerrit.libreoffice.org/71681
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-05-02 17:16:08 +02:00