testRmDocNotify was disabled earlier as it seemed to fail
intermittently. Hopefully, refactoring in
78876b011d2c3da972ef456a6da2cac08cb0d7d6 and
4360d31c9e8a3a099d869a9dfd0e2db8a0c03a52 should fix this one too.
Change-Id: I542ca27fab7eb4dfa8ed4a55a7f2eada63e7b96c
Admin notify messages are emitted when websocket connection is
established, not when 'load' message is sent.
And, some minor cleaning.
Change-Id: If52a77c10c3af64dcca8d6c10868b3d46f48c774
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>
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>
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...
:-)
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>
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>
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>
README suggests not using an initial underscore for those. Rename the
few cases which don't respect this recommendation.
Change-Id: If36a36da9374597f6b9090e7f81a1b3fb2f23647
... 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
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>
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>
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>