Commit graph

1156 commits

Author SHA1 Message Date
Henry Castro
d39d2cd798 test: fix unit-load missing 'readonly=1' token
Change-Id: I064dc4017a31ed177439212240c0c1041554fc2b
Signed-off-by: Henry Castro <hcastro@collabora.com>
2023-09-15 10:21:53 -04:00
Paris Oplopoios
e5b7464bbf Invalidate canonical id unconditionally
Signed-off-by: Paris Oplopoios <paris.oplopoios@collabora.com>
Change-Id: I061e34af1a1676e5bba5d476ea9e7ff5758744a1
2023-09-12 00:49:18 +02:00
Caolán McNamara
084e715dc6 TileDesc broadcast field is always false
apparently since:

commit b0a7532b08
Date:   Sat Nov 14 19:43:02 2020 +0300

    Turn off broadcast on presentation preview tiles

so drop this field from TileDesc and protocol.txt

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ib4b1eca0d30911e13c245551cb3e3261afc99dd2
2023-09-11 09:38:49 +01:00
Paris Oplopoios
0621aa4825 Fix canonical id related unit tests
Signed-off-by: Paris Oplopoios <paris.oplopoios@collabora.com>
Change-Id: Ie4b965c3bac8cddd48a47343d2d1c5f387d8bd41
2023-09-06 10:28:26 +02:00
Paris Oplopoios
cfd1d2e01f Revert "Give new sockets a canonical view id in tests"
This reverts commit a003126a65.

Signed-off-by: Paris Oplopoios <paris.oplopoios@collabora.com>
2023-09-06 10:28:26 +02:00
Ashod Nakashian
e6798e9062 wsd: exclude readonly sessions from modification indication
Read only sessions cannot modify the document, so
we shouldn't consider input from such a session
as potentially modifying the document. This
becomes important during an abrupt disconnection
where we look at isPossiblyModified() as an
indicator for data-loss.

New unit-test that reproduces the corner-case
with disconnection. With graceful unloading
a previous unit-test verified that it worked
as expected.

Change-Id: Id84cda4f4599c559018247c32ea1205e154e4984
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-09-01 07:18:12 -04:00
Cosmin Humeniuc
5fcdf5bf6d test for not to cut in the middle of a UTF-8 multibyte sequence
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id13995ff7e775105882c726144f39aadaef76e64
2023-08-25 08:41:46 +02:00
Caolán McNamara
ce56852851 clarify the meaning of the len arg to getAbbreviatedMessage
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4bdcc8d2fbd5a2ee74b6743b369196825eeb4fb0
2023-08-25 08:41:46 +02:00
Caolán McNamara
e3cfc935ff cid#318907 silence Uncaught exception
silence various of these in tests and utilities

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4fcc95b1b5d5c95e5ac40782550f95c08a3467bd
2023-08-24 08:30:40 +02:00
Caolán McNamara
492f678996 add and use 'N_ELEMENTS' in lieu of std::size
which isn't available in the current android toolchain

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I5834adb7c6211c7aad38f5977a7e425d9ca257fd
2023-08-23 12:06:31 +02:00
Caolán McNamara
62504735ea cid#318868 silence bogus Double free
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4ef594a2274a6a2b646ce2a305cdab6263390ef7
2023-08-16 15:15:59 +02:00
Caolán McNamara
478fd19ccc cid#318850 Unchecked return value
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iacca79e45e4a7ba299be8705765ffefd3b7feb28
2023-08-15 08:21:44 +02:00
Caolán McNamara
0c611649e5 cid#318854 Unchecked return value
check this one like we check all the others

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id8379c6873fe7dd6466dc265cea6847d120aa0ce
2023-08-09 13:39:23 +02:00
Paris Oplopoios
a003126a65 Give new sockets a canonical view id in tests
Signed-off-by: Paris Oplopoios <paris.oplopoios@collabora.com>
Change-Id: I0c8a534fccb8088ab303852304802b4926369058
2023-08-05 12:00:08 +03:00
Caolán McNamara
040ee51ec9 occasionally testTileSubscription fails
sometimes the deltas arrive in a different order, later in the same test
we have "ordering is undefined tiles arrive in so swap if needed" for
a pair of later deltas, so do the same reordering for this
intermittently failing earlier test

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: If51edb9a4e22d469d9e029c38da7348c34b17832
2023-08-04 11:18:02 +01:00
Jaume Pujantell
63473360b1 save-as preserves document password
Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: Ibaa00fbe4e83c8e4edfe2a70ede861f9adbd20bf
2023-08-03 11:09:35 +01:00
Ashod Nakashian
75ae9894b9 wsd: Util::make_unique -> std::make_unique
Change-Id: I1063913f91571ea6ad95386a3da6a4072574d155
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-08-03 08:40:20 +02:00
Ashod Nakashian
67dd4e4a9d wsd: test: new cool.html post request test
Using our own http library, we request
cool.html with realistic parameters and
validate many key values sent in the
request.

Change-Id: Ie3c0ac042f64bf5d6ed21354a33efac801b32846
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-08-03 08:40:20 +02:00
Ashod Nakashian
4f8d0fc4cb wsd: test: better UnitWSDClient interface
Change-Id: I4ed292bfccc57f5b41e2ce44a3c30bcad405ae09
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-08-03 08:40:20 +02:00
Michael Meeks
6c382f5415 rle: optimize inner loop bit-bashing.
Simplified code:

+ re-use the bit mask as an inner loop counter.
+ turn alpha only rows into zero length with agreed lastPix.
+ keep lastPix around on the stack.
+ handle odd widths in a duplicate slow-path

Change-Id: Ibc7630f7187ea5f4904c6fed14dda28cdfbf7523

rle: further optimize the pixel reading & de-compression.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ifcaaa45d1de6532b3fd43015c47a37daf56c2ea5
2023-07-31 21:31:13 +01:00
Michael Meeks
f41a8bed3e deltas: more unit tests for wire-id fun.
This should catch the case where one view should get an empty
update delta, and the other should get a new keyframe tile.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I3ad8f564cc45d80186430b463214ffcf092346f3
2023-07-18 09:43:34 +02:00
Michael Meeks
4d9070b1da Remove long obsolete ENABLE_DELTAS conditional.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I7f254328ba1be8074d8f1feabd7b89304166281d
2023-07-17 11:35:25 +02:00
Michael Meeks
d309d7199a deltas: fold the update: command back into an empty delta: command.
Also: address parts of #6897, primarily:

* remove the problematic aspect of bumping the last wid in our
  TileData, when this could trigger a re-send of a previously
  sent delta, causing tile corruption.
    * instead append an empty wid entry.
    * as an optimization - if the last entry is empty update
      the wid - since re-sending an empty delta is of no
      concern.

* simplify a number of code-paths that special-case zero length
  deltas. All deltas now commence with 'D'.

* still track updates in the JS - by detecting empty deltas.

* shares more code and simplifies various paths.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I02af6d4b152524c201b6985b7a3497da7f08a517
2023-07-17 11:35:25 +02:00
Michael Meeks
b7d7c02a3f deltas: allow JS tilecombine to force sending a keyframe to the client.
However, don't force rendering a keyframe, only sending it - other
clients may be happy with deltas. This is to better handle:

window.app.console.debug('Unusual: Delta sent - but we have no keyframe for ' + key);

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I4efff0f6b1d2817e6b8bd567eb3b098383a1ef42
2023-07-17 11:35:25 +02:00
Michael Meeks
9270ceef16 update: send for redundant tilecombine requests.
Update tests to check for this too.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I02c8f3167886321496245589b34a382fd61617f0
2023-07-13 08:14:48 +01:00
Ashod Nakashian
ec120ccfab wsd: test: enable testCrashForkit
Change-Id: I2acabeccda6caf660c73f2f46fdd96a4b3f28972
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-12 07:00:41 -04:00
Ashod Nakashian
2fd159bc0c wsd: better always-save-on-exit handling
Change-Id: Id718f81fc2eb0af5ca5bfe61e687de5258dbdd7d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-12 07:00:41 -04:00
Ashod Nakashian
2756d48a5a wsd: test: new UnitWopiLockReadOnly test
Change-Id: I67aec627737fd3e67ad576aaba378b7391641b87
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-12 07:00:41 -04:00
Ashod Nakashian
68e20add3b wsd: better data-loss detection
Had to disable a crash test due to incorrect
modification check before unloading.

Because we think there are modifications to
the doc, we issue a save, which will fail
because the kit is killed in said test.

Will be re-enabled when isPossiblyModified
is improved.

Change-Id: I0dd7931308e66e9a12d891a979d54e3f373ef99b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-12 07:00:41 -04:00
Ashod Nakashian
0a969e5006 wsd: better modification detection after saving
And now UnitSaveOnExitUnmodified verifies that
we do not unnecessarily upload unmodified
documents because always-save-on-exit is set.

Always-save-on-exit is meaningful only when there
are modifications. Otherwise, we create identical
copies as separate revisions.

Change-Id: I933069d31d3d273c41734b58e0849680566e591a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-12 07:00:41 -04:00
Caolán McNamara
5aa0296d4d fix getPartFromInvalidateMessage
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Idd2cf3a7bf118ff82aaf0ed50c5f8fdd97fe5ee3
2023-07-08 13:08:59 +01:00
Ashod Nakashian
e2b8388dfa wsd: test: logging in UnitWOPIFailUpload
Change-Id: I4c51e6a56e5cf28b11a5652b5849ca54c25ee53b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
22292d630f wsd: test: minor improvements to UnitCopyPaste
Change-Id: I0fe2390806ee736f44d76ab128e911b66b5e059b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
87bce5dc5d wsd: test: merge UnitWopiUnlock into UnitWOPILock.cpp
Change-Id: If051032e2ed9d7a0ab345bdad710ba1eafe92d96
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
8ef57dd2ec wsd: better newChild unit-test event
Change-Id: I8403e14780ad0bf971625934b7011fba1f24f07c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Caolán McNamara
76a5a9baff transport in rgba order
so if core is compiled with a cairo using rgba the pixels can
be sent without need to reorder in server or client

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iaf0410f1eaa605b9ce2716625f6c968bca523ccb
2023-07-05 11:58:54 +01:00
Caolán McNamara
490b0c0d0d drop non-standard width=400 height=400 tile request in unit test
there since:

commit 232499f542
Date:   Thu Apr 21 12:34:30 2016 +0300

and

commit bf66f7a908
Date:   Mon Jun 13 20:31:14 2016 -0400

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I04745be0581a697bbc3b15ba1d8bb94207320a7a
2023-06-23 16:55:25 +01:00
Caolán McNamara
962ecba493 push bgra->rgba conversion to the client
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I425655bfd5e6fd9e1e3ca0b6bcc914511ba188b3
2023-06-23 14:20:42 +01:00
Michael Meeks
12e0830b1b Kill canceltiles support completely.
This stopped working well a long time ago, and is already disabled
on the coolwsd side, so dung out the rest of the code & docs on this.

Change-Id: I2e0b73fe9780e16c3cc74ae3a38ae6b04434717a
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-06-22 09:35:22 +01:00
Caolán McNamara
a06f31ec77 WaE: -Werror,-Winconsistent-missing-override
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I35bbc86924cfc1f9045d8168119d022f23edeac4
2023-06-21 16:40:47 +01:00
Michael Meeks
28808ebf6a delta: Add unit tests for RLE encoding, and debugging support.
Change-Id: Ie0b62dbad8af2ab6ff95d6279c69de083c2cd888
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-21 10:00:10 +01:00
Ashod Nakashian
4363e2abe0 wsd: test: correct message example in comment
Change-Id: Id7bb0fba2e7233cf3f8167e46af7e4f99901dbaf
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-20 03:55:19 -04:00
Ashod Nakashian
6892d63916 wsd: test: minor cleanup of UnitWOPIWatermark
Change-Id: I9e69c432ee0c4a4f8fab3fe64137a4c33df7c811
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-20 03:55:19 -04:00
Ashod Nakashian
bc5e9f1ed0 wsd: test: use configCheckFileInfo instead of handleHttpRequest
Change-Id: Iff526bda55e112877df74d55f21bc8108bb384f2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-20 03:55:19 -04:00
Ashod Nakashian
6f0199f07f wsd: test: refactor assertCheckFileInfoRequest into the handler
Change-Id: I089706147b12d75d8dce8ffb740ffe738f1354ec
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-20 03:55:19 -04:00
Ashod Nakashian
fc80fb66bf wsd: test: refactor assertGetFileRequest into the handler
Change-Id: I4a1a17bac9694f92ffab49d1c9143bab83f22835
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-20 03:55:19 -04:00
Ashod Nakashian
b6a8ca439b wsd: test: use sendAndShutdown
Instead of explicit send and shutdown calls.

Change-Id: Ia08ccc003b1fa6c224d2cc9bc2520c722bf5752c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-20 03:55:19 -04:00
Ashod Nakashian
6179aac456 wsd: test: reduce manual http header creation
We have http::Response specifically for
this kind of thing.

Change-Id: I4cc24378741bb1da76967e9c01a33060d11cdc4b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-20 03:55:19 -04:00
Ashod Nakashian
e93e7fd3b5 wsd: test: reuse getDefaultCheckFileInfoPayload
Change-Id: I7cc1aab6bac397d46c4b87e5f4f943f7a141c8e6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-20 03:55:19 -04:00
Ashod Nakashian
901ea7969a wsd: test: refactor the default CheckFileInfo payload
Change-Id: I357e5733cba12b1826d13ca0cdc6d5de3da0afd0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-20 03:55:19 -04:00
Ashod Nakashian
d0d09e3d51 wsd: test: testInactiveClient may get jsdsialog message
Change-Id: Ib5df91537e91e0a658fd7c47fa5fd07610f0c786
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-20 09:42:49 +02:00
Andras Timar
4ac8c8ee28 configure option to disable building unit tests
rational: building for release takes a lot of time and we
neither package, nor run (most of) these unit tests when
we make packages.
CI runs all of these tests before merging PRs, so risk is low,
if we do not run the few build-time unit tests when we package.

make -j12
--enable-tests (default): 3m 18s
--disable-test: 1m 9s
3x faster...

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I4edd98af55748432e30c65c4c910e72c0221272a
2023-06-16 09:12:21 +02:00
Caolán McNamara
24d55168ac cid#318916 Uninitialized scalar field
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I5272fa72fb9edc32a1e1f93f17dafff907278672
2023-06-14 10:10:46 +02:00
Tomaž Vajngerl
d23ddf1342 support callback for changing the color palette
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I8d0dec4afd91bcdf66799f3afba1fd77cbc223db
2023-06-09 14:30:45 +02:00
Caolán McNamara
71d630c607 DeltaTests::testDeltaCopyOutOfBounds fails in a build from make dist tarball
because data/delta-graphic.png and data/delta-graphic2.png are missing

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ie850d9ae76946e891d2928de80c5ded4e970f4cf
2023-06-07 14:48:39 +01:00
Paris Oplopoios
21966e1a9c Fix copy command going out of bounds during delta creation
When creating a delta, the copy command could copy from rows that are
bigger than the height of the tile. This would go unnoticed on light
mode because the js side that applied the delta would apply these out of
bounds rows with a white color, but it is noticable in dark mode. Made
it so the copy command stops copying from out of bounds.

Signed-off-by: Paris Oplopoios <paris.oplopoios@collabora.com>
Change-Id: I4d05cb411958d0945933edb5c812de2dfd9c1abd
2023-06-05 08:59:39 +01:00
Julius Härtl
752cde163e feat: Add UITheme option for light/dark to ui_defaults
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Change-Id: Ief028dcec0daa2ae448f83df993e0e5ade594a7c
2023-06-01 09:49:08 +02:00
Marco Cecchetti
b9f9cef60a a11y: populating editable area with focused paragraph
We handle notification from core about currently focused paragraph:
content, caret position, text selection start/end.
Notifications are sent on any text changes, even when the text has
been modified in another view.
Moreover we can request such info to core at any time.
That allows AT software to read focused paragraph and selected text.
All that keeping editing still working.
A set of new cypress tests for checking clipboard content has been
developed.

failing cpp unit test:
- HTTPWSTest::testInactiveClient
'unexpected message' assertion was failing since an idle client can
receive an a11yfocuschanged message when the same paragraph has focus
in both view and the active view is editing the paragraph.

failing cypress tests:
desktop
- calc/autofilter_spec.js
  - added more wait time before performing clickOnFirstCell
- impress/undo_redo_spec.js
  - Repair Document was broken
    - we need to select 'Hello world' in order to overwrite it

mobile
- impress/spellchecking_spec.js
  - Apply suggestion
    - better use selectTextOfShape instead of Ctrl-A

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I070d390543fa66fe786c4a0661fa09f891b9883e
2023-05-31 22:43:51 +02:00
Ashod Nakashian
29cf77d129 wsd: test: better Ownertermination test
Fixes a race-condition due to re-loading
attempts when the second one fails (as
expected). Now we retry the loading
while unloading repeatedly until we
either succeed or hit the timeout.

Change-Id: Icf9d8e146bc2aad5bf71c7c521466bf567ddb05d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-31 07:40:11 -04:00
Ashod Nakashian
941ff1e2fb wsd: test: reduce test run time
Change-Id: I0e6b013892d3ad813a5db6a8a1328849dcd0c6ab
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-31 07:40:11 -04:00
Ashod Nakashian
545aa4acb8 wsd: test: merge UnitWopiHttpRedirectLoop with Redirect
Change-Id: I25a2ae4e5d0864b36e520ebb75c31d45b0c12530
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-31 07:40:11 -04:00
Ashod Nakashian
76ab3785c2 wsd: test: break connectLOKit when shutdown is signaled
Change-Id: Ic4869f782fe41ba2cb626ad0e4ebc6fc6a667725
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-31 07:40:11 -04:00
Ashod Nakashian
2164a65b7e wsd: test: use http::Response
Change-Id: I6faf3fca96b16af450b45279891f1db6110cce71
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-31 07:40:11 -04:00
Ashod Nakashian
2310fa3270 wsd: test: simplify UnitWopiHttpRedirect
Change-Id: I04dd5b5fb83a11c11651372c443e0647975c88c3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-31 07:40:11 -04:00
Ashod Nakashian
d5035eb30e wsd: test: use http::Response
Change-Id: Icdb73e1bbedd738728cef6bd09b322612ec5fbaa
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-31 07:40:11 -04:00
Ashod Nakashian
87bc771c27 wsd: test: simplify UnitWOPIHttpRedirectLoop
Change-Id: If46c7646aa6be091e93f86b34a81618f84f4ffe2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-31 07:40:11 -04:00
Ashod Nakashian
2f1e5b312a wsd: test: better upload conflict test setup
To support parallel loading, we need to
start a test not when a DocBroker is created,
but before we send the first load requst.

This changes the test structure to rely
do that explicitly, rather than using the
onDocBrokerCreate callback.

Change-Id: Ie4fb1317961a75ad6730e27d600444e986296766
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-31 07:40:11 -04:00
Ashod Nakashian
4f5bea53cf wsd: test: log resetting wopi event counters
Change-Id: I34c67b460803526b7d61fb357080e67ccf63551a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-31 07:40:11 -04:00
Ashod Nakashian
31bd6f6308 wsd: test: improved UnitLoad
And re-enable a number of previously
disabled tests. They seem stable.

Change-Id: I6d263708edbf1ca0411500a6876e110be8acb326
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-31 07:40:11 -04:00
Ashod Nakashian
c0908ecc8c wsd: test: fix uninitialized member
Change-Id: I4c103e1e11ee022e25c2097fb29dc798dfc8b466
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-31 07:40:11 -04:00
Ashod Nakashian
3b8f297669 wsd: test: testname in UnitSession
Change-Id: I0c9585fe83c72d0601712bcbf685f716787c13eb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-22 09:34:29 -04:00
Ashod Nakashian
bd4589d142 wsd: quarantine: cleanup quarantined files when unloading cleanly
Change-Id: I1934bca783f94847c73e9c47d0e8c703dbe75a99
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-15 08:47:26 +01:00
Ashod Nakashian
c6dd263ab1 make: silence clang complaining of -pthread
The clang linker doesn't need -pthread and
warns of unknown command-line option.

This detects clang and forgoes the -pthread
flag to the linker.

Change-Id: I658cd887c567a5beeeae0e6e1b6d596231894c1b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-15 08:47:26 +01:00
Ashod Nakashian
d40aaec1e4 wsd: test: add quarantine test
Change-Id: Ic08f7ed0f177fc5e3a08b47e16ba8131c6dff788
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-15 08:47:26 +01:00
Ashod Nakashian
d4b27f6643 killpoco: replace HTTP status codes
We use our own status codes, which
are type-safe and use streaming
operators to serialize and log.

Change-Id: I0eba7b16694866b5a79476a7ef4b1b78f7f9c176
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-11 07:21:42 -04:00
Ashod Nakashian
5d2f27d4cb wsd: test: reorder tests to minimize parallel runtime
Change-Id: Ib308757cd100df83b934995c2eee2d38d3120ecb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-02 19:54:31 -04:00
Ashod Nakashian
576dc6254f wsd: test: faster httpwstest
Change-Id: Ifa68800ba96fd8adaedd82b1551686213c1bb309
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-02 19:54:31 -04:00
Ashod Nakashian
1d482cf5cf wsd: test: selectAll and deleteAll improvements
It seems we no longer always issues textselection:
message after these uno commands, so we end up
waiting and retrying for the longest time.

Change-Id: I47b15b9830585ae58e4400fcf760051506ab69dd
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-02 19:54:31 -04:00
Ashod Nakashian
a54416311f wsd: test: time countCoolKitProcesses to catch slow unloads
Change-Id: I26e4382badc4b3e3172d3788e27f024ee7e07c7d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-02 19:54:31 -04:00
Ashod Nakashian
05ecebe482 wsd: cosmetics and header include fixups
Change-Id: I573e4336b57abfc7bcd77ff0a83042202147e53f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-02 19:54:31 -04:00
Ashod Nakashian
86c1dca7b6 make: cosmetics
Change-Id: Id1ebe96edef9f41be05b84e4c27388adde864aa3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-02 19:54:31 -04:00
Ashod Nakashian
1c4a3bfe1a wsd: test: rulerupdate is an expected message
Change-Id: I42a73914988731fd9d5bdf116d491a8a96070384
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-28 06:58:58 -04:00
Ashod Nakashian
6f5316ca93 wsd: test: new test for superfluous save commands
Change-Id: I8cdc589bf0fa3e2fee0991987e62ffdae7af6332
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-28 06:58:58 -04:00
Ashod Nakashian
8c6d92bc46 wsd: test: ignore requests after testing has finished
Change-Id: Ifcb28bffb2aecd5c0d9c83fa7cdbd3a203b38f37
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-14 11:30:14 +01:00
Ashod Nakashian
4089302362 wsd: better socket logging
Change-Id: I31b64ce1f174896a3bcfa5cd620e0babd7f425d1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-14 11:30:14 +01:00
Michael Meeks
5a2127003f disable fragile TileCacheTests::testTileBeingRenderedHandling.
Fails intermittently under load, responsible for most unit-tile
failures.

Change-Id: I88de8524b51ee7d97a28e31c001534a506d52f0e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-04-12 18:01:40 +01:00
Ashod Nakashian
f41ba11bad wsd: test: socket context logging
Change-Id: Ib3675985cf0e2d8864ed544d5e7c615d5fde2331
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-04-11 08:03:01 -04:00
Michael Meeks
05ae0ab631 TileCacheTests: re-copy documents when repeating tests.
Attempted blind fix for intermittent failure:

[ kitbroker_004 ] TRC  Document::GlobalCallback LOK_CALLBACK_ERROR
[{ "classification": "error", "cmd": "load", "kind": "io", "code": 770, "message": ""}].
filter/source/config/cache/typedetection.cxx:452: caught exception while querying type of ...
"Could not open stream for <file:///tmp/.../disconnectMultiView_5f47c785_setclientpart.ods>
at filter/source/config/cache/typedetection.cxx:1123"

[ coolwsd ] TST  disconnectMultiView-1  [loadDocAndGetSession] (+22012ms):
ERROR: Assertion failure: Failed to load the document
cool/file%3A%2F%2F%2Ftmp%2FdisconnectMultiView_5f47c785_setclientpart.ods/ws.
Condition: isLoaded| helpers.hpp:531

Change-Id: I91062bf4c136dbd6a4cf6def842ff2ae7687c758
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-04-10 19:46:07 +01:00
Miklos Vajna
5f77363c4f test: fix -Werror,-Winconsistent-missing-override
'trimIfInactive' overrides a member function but was not marked 'override'.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I25b0033652a3362118a77b7ef5ef7a511ce492ea
2023-03-29 17:31:42 +01:00
Michael Meeks
7444decf9f trim memory when user is inactive.
Builds on a new LOK API to do the same in the core.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I4443cd2ffbb6c7af0726162aec2ba78fc354d901
2023-03-23 11:31:24 +00:00
Paris Oplopoios
da57ca61e1 Uncomment most TileCacheTests
Signed-off-by: Paris Oplopoios <paris.oplopoios@collabora.com>
Change-Id: I1103d6c5f474b2f177189f3cc82030be7340235c
2023-03-22 15:32:52 +01:00
Andras Timar
0cd7ec4449 CI check
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ibc2c700a5c5f89ada067125ad995fd57c1274159
2023-03-20 20:10:49 +03:00
Andras Timar
98ae6ac269 disable fragile TileCacheTests::testTileProcessed()
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I791b24b59a22f87006a334332e7b8661615ac21d
2023-03-14 21:17:13 +01:00
Ashod Nakashian
9c39ebad1f wsd: string::empty() is clearer than size() == 0
Change-Id: If2e25d344b5718c35cb9ae7b7519010ee88f0f60
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-10 07:45:12 -05:00
Ashod Nakashian
e3deb96152 wsd: log the socket FD of http::Response
Change-Id: Ibd02ee6656f4db2e7b09e0b7702a6db55ec8269e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-06 08:43:37 -05:00
Ashod Nakashian
38daf70f0a wsd: test: minor test server logging improvement
Change-Id: I509952c80be91dc6d0b97dfdb1df0a98d4051e24
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-06 08:43:37 -05:00
Andras Timar
3e6705a3b6 fix include_path with non-system libs in test/Makefile
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ic6dfa7086e1b7fc55b007cee679577a584adeee9
2023-02-26 19:19:22 +01:00
Ashod Nakashian
c045fc8bea wsd: test: minor cleanup of UnitWopiLock
Change-Id: I66973743c2c84d4f9ad459da323e2db9ba76d5c1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-02-23 07:58:56 -05:00
Ashod Nakashian
d1b1f960aa wsd: test: new test to verify refresh lock behavior
Change-Id: If28ab29c43f638f111169673d9a8ee5651fa6da8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-02-23 07:58:56 -05:00
Ashod Nakashian
fa069dca50 wsd: test: support controlling the response to LOCK/UNLOCK
Change-Id: Ie0d836a475f257bded5c73783398a6c300ac9d67
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-02-23 07:58:56 -05:00