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>
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>
"/hosting/discovery/" added in addition to "/hosting/discovery"
Change-Id: I33f7fda9981d8d4e95ca5d69d3d6b3da1e4b0eeb
Reviewed-on: https://gerrit.libreoffice.org/83169
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Extend the timeout, as often DNS lookup takes several seconds
and that delays the response from WSD.
Reviewed-on: https://gerrit.libreoffice.org/81198
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit ae085428dfb11b7965b73df0f40ac4fd1ec98a75)
Change-Id: Ie51bff31782fa33eb5559d28af1477e1947382a3
Reviewed-on: https://gerrit.libreoffice.org/81574
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
In case we fail to send the request, try again in 2 seconds (same value
as the session timeout) before giving up. This seems to be needed for
core.git dbgutil builds; but don't do that unconditionally, in case the
sleep is not needed for optimized core.git.
Change-Id: Ie9ad8c066b7988ca37729f797c4b8dbb0ae2cbd6
Check all pariticipating IPs to be allowed to use convert-to
functionality. In a simple use case it means the reverse-proxy's
and the actual client's IP.
Change-Id: I4ef9cb14a1c3003cba6c66f6e99d5b54b2c3b2b8
Extract the client IP from the X-Forwarded-For value
and use that one to allow / deny the usage of convert-to
feature.
Change-Id: I363c0931df5a0538236cae12f943fffd65086ee6
Add an entry to discovery.xml with the urlsrc where capabilities end
point can be found. Use json format to send back the feature list.
Change-Id: I390a53d956d53ca79e5a8090aead7f4131ec4ca0
And improve the logging support in unit-tests to
help troubleshoot issues faster and more accurately.
Also makes the code more readable (hopefully).
Change-Id: I4f8aafb5245e2f774b03231591a74544f9ec84aa
Reviewed-on: https://gerrit.libreoffice.org/48645
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Since this a fake session that doesn't
have a client socket, we push the
messages directly into the ClientSession.
But since the DocBroker poll thread will
probably not be ready by then, there
is no child process and the other
document bits needed to load (or indeed
process any client messages).
So we defer all the fake messages in
a poll callback to insure they are done
in the correct order.
Change-Id: Id81dc4288b305829149e6e9c81d0f7da719c59ad
Reviewed-on: https://gerrit.libreoffice.org/35712
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
and apply the nullptr plugin.
Lots of hacking in my LO tree required to make this work, will probably
end up needing to add an extra parameter to the LO side.
Change-Id: I02ae1dcdece9d9ddf05f7757f6696e3a5d7d1f14
Reviewed-on: https://gerrit.libreoffice.org/32339
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>