Commit graph

468 commits

Author SHA1 Message Date
Miklos Vajna
a83dd9a160 test: increase load timeout in UnitLoadTorture
This test sometimes failed on me just because the load was aborted due
to the timeout, doubling the limit makes the problem go away.

Change-Id: Ided724d67a513391b86836065d4e627581857a92
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90771
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-20 10:47:59 +01: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
Tamás Zolnai
19a7f1d288 test: better fix for UnitWOPISaveAs test
Don't check the full URL, but just test some parts of it.

Change-Id: I5367bf4f41dc26f311e03de7ce06349f744d0b85
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90428
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-12 17:47:35 +01:00
Ashod Nakashian
d8a9e11ad9 wsd: fix UnitWOPISaveAs test
Change-Id: I63da82da727e2902fdb35ff31b29df8c77976793
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90355
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-03-12 13:19:38 +01:00
Michael Meeks
e924625cc1 re-factor: Socket / WebSocketHandler.
Essentially we want to be able to separate low-level socket code
for eg. TCP vs. UDS, from Protocol handling: eg. WebSocketHandler
and client sessions themselves which handle and send messages
which now implement the simple MessageHandlerInterface.

Some helpful renaming too:

s/SocketHandlerInterface/ProtocolHandlerInterface/

Change-Id: I58092b5e0b5792fda47498fb2c875851eada461d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90138
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-03-11 16:48:03 +01:00
Miklos Vajna
a7d3efdd4e Introduce StringVector::equals()
Allows comparing tokens with C strings without a heap allocation. Do the
same when comparing two tokens from two different StringVectors.

And use it at all places where operator ==() has an argument, which is a
StringVector::operator []() result.

Change-Id: Id36eff96767ab99b235ecbd12fb14446a3efa869
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90201
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-03-09 09:46:33 +01:00
Michael Meeks
7eea5b85ab Remove unused filterHandleRequest unit test hook.
Change-Id: Id1ff6005e28bf02eb9cad3c1609f9a8079640689
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90155
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-03-07 14:26:42 +01:00
Miklos Vajna
547f9ea731 Rework StringVector to have a single underlying string
This is meant to reduce lots of small allocations and instead have
pointers into the single string for the various tokens instead.

This has a few requirements, though:

1) It's no longer OK to modify the tokens, changing their length would
invalidate the start/length of other tokens. Rework
DocumentBroker::load() to avoid such mutation.

2) The iterators no longer expose zero-terminated strings, so
Poco::cat() doesn't work anymore: add an own cat() instead and use that
in e.g. ChildSession. The own cat() has the benefit that it won't read
past the end of the array if the begin index is out of bounds to add
more safety.

(This nicely works towards killing Poco usage in general.)

3) If zero-terminated strings for all individual tokens is needed, a
copy has to be made, as done in spawnProcess().

(For all of these requirements, the build fails if there are problems.)

Change-Id: Iea40e4400e630b2d669f5c72aea85cb40edf9a2c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89711
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-02-28 18:31:37 +01:00
Miklos Vajna
b8bd1990aa Rework LOOLProtocol::tokenize() to return a StringVector object
The bulk of this commit just changes std::vector<std::string> to
StringVector when we deal with tokens from a websocket message.

The less boring part of it is the new StringVector class, which is a
wrapper around std::vector<std::string>, and provides the same API,
except that operator[] returns a string, not a string&, and this allows
returning an empty string in case that prevents reading past the end of
the underlying array.

This means in case client code forgets to check size() before invoking
operator[], we don't crash. (See the ~3 previous commits which fixed
such crashes.)

Later the ctor could be changed to take a single underlying string to
avoid lots of tiny allocations, that's not yet done in this commit.

Change-Id: I8a6082143a8ac0b65824f574b32104d7889c184f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89687
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-28 16:07:56 +01:00
Miklos Vajna
bbcfd8fad2 UnitRenderShape: update Writer reference SVG
Now that we don't re-compress PNG images since core.git commit
8fc1b60f62c213a0476f3acc9f89cd5eccbf335d (sw SVG export: try to reuse
original bitmap data for JPG and PNG bitmaps, 2020-02-27).

Change-Id: I869ae0a21f834e6f05bf9b897b15cf3392320cd8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89621
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-27 11:57:07 +01:00
Tamás Zolnai
8265fab93f test: remove redundant shape related C++ test.
This test case is covered by cypress tests. See
shape_properties_spec.js. Those tests will fail if
SVG rendering is broken.

Change-Id: I1a3434f9696c6a323a23ded0b1b2816d74373c7a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89590
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-26 21:38:09 +01:00
Tamás Zolnai
2e3d00130f test: fix random failure of unit-http test.
Sometimes the text content comes with the first recieve,
sometimes we need a second recieve to get that.
Don't fail when we get the content for the first recieve.

Change-Id: I3078995cae3c0cfefdd5f2b8eae8bad4003ec2fd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89347
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-24 15:52:27 +01:00
Ashod Nakashian
c742ca1011 wsd: improve test logging
Logs from test are now more atomic (less interleaving).
And each integration-test (old-style tests running from
new-style tests) will now print clearly when it begins
and when it fails, making it easier to find failures.
Misc other minor cleanups in test logging.

Change-Id: Iff664e42a04d1c6dbf1332b2884c35183ef85e21
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89309
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-02-23 22:04:04 +01:00
Tamás Zolnai
17bef63abd Try to fix parallel build.
We are running make -j2 check with Jenkins now.
Which fails with these unit tests. Let's just
serialize all, so we can test cypress test
parallelization.

Change-Id: Ib1ed21581c88cd86cbd13ef5c6b8b98abaef1da5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89211
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-21 15:48:13 +01:00
Miklos Vajna
d725ecbb56 test, UnitEachView: increase the timeout
I think this is the last case where sanitizers cause enough slowdown
that the test fails due to a timeout. The new limit is 4 minutes, the
test passes for me in 2m20s with sanitizers.

Change-Id: I7fccb593d67908bfaeba8eb8715d00cce48e84fb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88916
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-18 11:32:31 +01:00
Michael Meeks
6bdf561049 Share the Kit environment setup code.
Particularly configuration layers so we can tweak mobile config
easily.

Add core source files from configmgr for breakpointing convenience in
the iOS project. Add loolkitconfig.xcu to the iOS app bundle. Use
${BRAND_BASE_DIR} instead of a compile-time LOOLWSD_CONFIGDIR literal
on iOS (because there is no compile-time constant path to the app
bundle). No "registry" directory directly in the app bundle any longer
on iOS, a corresponding change in core.git moved that stuff to be
under "share", like on other platforms.

Change-Id: I6672efc0505abf27297c4758118a20992b10ceb3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88765
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-17 14:49:06 +01:00
Miklos Vajna
8c9e539586 test: improve timeout handling in getResponseMessage()
Sometimes unit-each-view fails on me in a situation like this:

21:00:13.331257 [ loolwsd ] TRC  debug, testEachView: waiting for message, timeout after 20s| UnitEachView.cpp:66
21:00:20.429615 [ loolwsd ] TRC  debug, testEachView: response is empty, will fail| UnitEachView.cpp:72

I.e. for some reason ws.poll() returns after 7 seconds, even if the
timeout at test/UnitEachView.cpp is clearly 20 seconds.

Fix the problem by trying again in case we got no data -- we'll still
break from the loop on timeout.

Change-Id: I913ecd692f350b9deb38705a0a2d24e8b3c799a0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88846
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-17 10:09:05 +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
Miklos Vajna
955f662294 test, unit-each-view: increase timeout
With this, the test passes under sanitizers as well.

Change-Id: I777e177d4f171328744cf83386276752d51700cc
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88584
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-13 11:13:32 +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
8b82efd285 test: increase timeout of UnitClose
This now failed under sanitizers due to a timeout. Make the new limit 2
minutes, sanitizers require 51 seconds for me (so we did not fit into
the 30 seconds default).

Change-Id: Ib8edb002b50e55b605152be5d50574c396964c25
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88424
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-11 10:02:17 +01:00
Michael Meeks
10caa82b0a tdf#130382 - unit test for core fix for text input ordering issue.
Requires the relevant core commit.

Change-Id: I1b89c476ed6900bd0c5d981d125824c4bc2bf6da
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87930
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-10 23:23:04 +01:00
Miklos Vajna
d142508d95 test: increase timeout of UnitLoadTorture
This now failed under sanitizers due to a timeout. Double the limit;
asan typically causes a 2x slowdown.

Change-Id: I943c6f900371ff4c05c760d3d993829d54264941
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87716
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-30 09:49:52 +01:00
Miklos Vajna
ea9c80b588 test: fix ODR-violation in SigUtil
==6642==ERROR: AddressSanitizer: odr-violation (0x0000024db3a0):
  [1] size=4 'SigUtil::SigHandlerTrap::SigHandling' ../common/SigUtil.cpp:113:38
  [2] size=4 'SigUtil::SigHandlerTrap::SigHandling' common/SigUtil.cpp:113:38
These globals were registered at these points:
  [1]:
    #0 0x68d7d8 in __asan_register_globals.part.13 lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0x7f4b7eeed83b in asan.module_ctor (online-san/test/../test/.libs/unit-base.so+0x6fd83b)

  [2]:
    #0 0x68d7d8 in __asan_register_globals.part.13 lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0x104590e in asan.module_ctor (online-san/loolwsd+0x104590e)

No need to include SigUtil for unit-base (invoked during 'make check'),
it's only needed for unittest_SOURCES (invoked during 'make').

Same for Log::IsShutdown(), 'vtable for Session', 'typeinfo name for
TileQueue', 'JWTAuth::_key', 'vtable for ClientSession',
'UnitBase::Global', 'SocketPoll::DefaultPollTimeoutMs' and
'SslContext::Instance'.

But don't just remove all wsd_sources from the new-style unit tests, as
that would lead to missing symbols:

[ loolwsd ] ERR  Failed to load online-san/test/../test/.libs/unit-base.so: online-san/test/../test/.libs/unit-base.so: undefined symbol: _Z20documentViewCallbackiPKcPv| common/Unit.cpp:40

(Seen during make check's unit-base.)

Change-Id: I305185f6437c5b4887d8e09a592e578a94f2659c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87323
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-24 10:34:00 +01:00
Miklos Vajna
6add8295bf test: remove documentation about no longer working CPPUNIT_TEST_NAME variant
This is not needed, the commandline to run the test is printed on
failure.

Change-Id: Ia4da4344ede4ad8c1627a5560f1bc1264f4203c7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87288
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-24 00:09:34 +01:00
Miklos Vajna
abe076e56d test: restore ability to just run a single unit test
This was removed in commit 0599db3576
(copyFile: de-poco-ize and handle EINTR and short writes., 2020-01-18),
probably by accident.

Change-Id: I36bed5851fbfa0c37a007bedb6f318aaf4d8c64a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87233
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-23 09:19:43 +01:00
Pranam Lashkari
a019c93d90 Resolved: Server crash when link opened in new tab
When trying to open a link normally from help->Online help
nothing happens but the popup is closed.

When trying to open a like forcefully in new tab
from help->online help it crashes the server.

Change-Id: I7e0944ebe521002625a84e155e379ed7e25d2309
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/85466
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-22 23:23:51 +01:00
Michael Meeks
f0bfe402fd test: forcibly serialize more
Change-Id: I2fd370c5bdd440e3be2c065f9b834ffa4e7f856b
2020-01-21 15:07:54 +00:00
Michael Meeks
50deb943bd test: simplify and remove obsolete /proc grokking code.
Change-Id: I482c56dd76067019d83196aa305d14703e25bb44
2020-01-21 15:07:54 +00:00
Michael Meeks
9126a641a9 test: switch to using ClientPortNumber to allow parallelism.
Change-Id: Ifef3bce1b217605000300b240ea74df4d264e0df
2020-01-21 15:07:54 +00:00
Michael Meeks
43d0de1234 test: serialize tests for now.
Change-Id: I6309976f324a66a57baf4678e49c0c1e09b9dc48
2020-01-21 15:07:54 +00:00
Michael Meeks
e844b89d6c test: simplify the timeout logic.
Change-Id: I0c253629b983f2813237536e6e2c6d04d5b97dd1
2020-01-21 15:07:54 +00:00
Michael Meeks
8f91659ae0 test: dung out redundant LOOL_TEST_CLIENT_PORT.
And cleanup other related oddities.

Change-Id: I2d179a2ece6a8553e10e406ad4e5da08a2ff58e5
2020-01-21 15:07:54 +00:00
Michael Meeks
9dfac6dab1 test: switch to parallel tests based on Unit framework.
Increase a few timeouts, bin old-style standalone unit tests,
fix a number of bugs.

Change-Id: Ia3d59466ecb9a9443807ba3445d04dd5f77e3dba
2020-01-21 15:07:54 +00:00
Michael Meeks
0599db3576 copyFile: de-poco-ize and handle EINTR and short writes.
Change-Id: I2046881c786a9f31f45c53f282de9ddd9a9cebcf
2020-01-21 15:07:54 +00:00
Miklos Vajna
e2fa8c43a1 Convert some of the integration-http-server tests to new-style ones
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I164b97be0bc487a02d4b2a872b9c0e40791056cd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86951
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-17 09:16:41 +01:00
Miklos Vajna
d10bbef749 Convert the WS error tests to a new-style one
So that they are in-process, which means it's easier to debug when they fail.

Change-Id: Icb3d7a7d0ffa7371eb3056b5de7144137c0acb8a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86463
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-09 08:59:09 +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
d0fee8c6ad These can be made const
Change-Id: I952a7566176bda727f8c2e9618d41bfb7bb1240f
Reviewed-on: https://gerrit.libreoffice.org/85197
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-16 09:24:08 +01:00
Michael Meeks
f95cc10438 A new convert-to unit test, hopefully taking longer to load.
Change-Id: I8d8291e272a175ab3c846b692bb34b185b2b8278
Reviewed-on: https://gerrit.libreoffice.org/85008
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-12 08:57:28 +01:00
Miklos Vajna
b580a1eaf2 wsd: fix a typo
And disable a test that passes for me locally but fails on Jenkins.

Change-Id: Ifcdcedbac259247d784ce66185f95bfbe634381f
Reviewed-on: https://gerrit.libreoffice.org/84603
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-06 12:12:43 +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
5bf3fc86be test: fix UnitLoad::testConnectNoLoad()
Depending on timing, this failed with the following error:

wsd-14400-14411 [ docbroker_001 ] WRN  Will not load document marked to destroy. DocKey: [/tmp/connectNoLoad_27c61e41_hello.odt].| wsd/DocumentBroker.cpp:520

Make sure we don't try to load the same document again when the cleanup
for the previous session is not done yet.

Change-Id: I354999fa934df665b48dca314d2b77ab95c84ec0
2019-12-05 08:48:32 +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
24c914dda1 test: fix unit-http
There were two problems here:

- there are much more headers than the one stated in "start", and as the
name implies, that's only the start of the headers, so assert it's a
matching prefix instead of full match

- the second case got the condition wrong, assert states what is the
assumption, does not check for an error state

With these, this test passes again.

Change-Id: I39f644849fc4808d73d1f95e2cda57d9465aacbf
2019-11-26 10:51:01 +01:00
Ashod Nakashian
717d3132b2 test: improve unit-tests
Change-Id: I2fd499886616809975d769632b183354d7feb32f
Reviewed-on: https://gerrit.libreoffice.org/83046
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-25 17:05:49 +01:00
Miklos Vajna
4358087be2 test: fix typo, unit-load should invoke code from UnitLoad.cpp
Change-Id: I47354f1d68075bc12a2e96832aeaa5f49ecb1d9a
2019-11-25 15:00:44 +01:00
Miklos Vajna
2ce1a7f61c test: clean up not needed memset()
Use std::vector instead of a C array, where the elements are initialized
with zero values by default.

Change-Id: I3c69b588e2a2c3deba052eae35da87a3d085491e
2019-11-25 08:28:12 +01:00