libreoffice-online/test
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
..
data leaflet: fire Doc_ModifiedStatus with modified state of the document 2019-09-03 01:53:12 -04:00
.gitignore Revert "Get rid of use of GNU libtool" and its follow-up 2019-05-27 10:25:51 +03:00
countloolkits.hpp test: log the time in tests 2019-10-28 10:49:25 +01:00
DeltaTests.cpp
fakesockettest.cpp wsd: test: don't leak the test listener 2019-09-22 20:25:28 +02:00
helpers.hpp test: improve stability of a number of tests 2019-10-29 01:41:00 +01:00
httpcrashtest.cpp Try to avoid a timing problem in HTTPCrashTest::testRecoverAfterKitCrash() 2019-08-30 12:22:11 +02:00
httpwserror.cpp
httpwstest.cpp test: improve stability of a number of tests 2019-10-29 01:41:00 +01:00
integration-http-server.cpp Try to avoid connection refused error in HTTPServerTest::testConvertTo() 2019-08-23 08:36:27 +02:00
Makefile.am Convert password protected test to a new-style one 2019-10-28 09:12:32 +01:00
run_unit.sh.in test: don't validate ssl certificates while running unit tests 2019-10-14 10:04:36 +02:00
test.cpp typo fixes in comments and code 2019-10-08 11:49:45 +02:00
test.hpp typo fixes in comments and code 2019-10-08 11:49:45 +02:00
TileCacheTests.cpp TileCache: track and limit size to control memory usage. 2019-10-28 20:29:01 +00:00
TileQueueTests.cpp Added normalizedViewId to the tests with tilemsg 2019-10-15 18:13:03 +03:00
UnitAdmin.cpp
UnitClient.cpp
UnitConvert.cpp clipboard: test for set-clipboard endpoint (disabled). 2019-08-05 21:18:36 -04:00
UnitCopyPaste.cpp clipboard: persist selections for a while after a view closes. 2019-08-05 22:21:54 -04:00
UnitFuzz.cpp
UnitHTTP.cpp typo fixes in comments and code 2019-10-08 11:49:45 +02:00
UnitLargePaste.cpp typo fixes in comments and code 2019-10-08 11:49:45 +02:00
UnitLoadTorture.cpp Convert load torture testcase to a new-style one 2019-10-21 09:04:12 +02:00
UnitOAuth.cpp
UnitOOB.cpp
UnitPasswordProtected.cpp Convert password protected test to a new-style one 2019-10-28 09:12:32 +01:00
UnitPaste.cpp Convert paste testcase to a new-style one 2019-10-18 09:06:53 +02:00
UnitPrefork.cpp tdf#107038 Poco::Timestamp replacement with std::chrono 2019-09-28 12:51:18 +02:00
UnitRenderingOptions.cpp Convert rendering options to a new-style one 2019-10-25 08:54:46 +02:00
UnitStorage.cpp
UnitTiffLoad.cpp UnitTiffLoad: remove not needed config.h include 2019-09-16 09:06:38 +02:00
UnitTileCache.cpp
UnitTimeout.cpp
UnitTyping.cpp Added normalizedViewId to the tests with tilemsg 2019-10-15 18:13:03 +03:00
UnitWOPI.cpp
UnitWOPIDocumentConflict.cpp
UnitWOPILoadEncoded.cpp test: fix build in UnitWOPILoadEncoded 2019-05-24 09:09:08 +02:00
UnitWopiOwnertermination.cpp
UnitWOPIRenameFile.cpp Fix build. 2019-05-14 10:11:21 +02:00
UnitWOPISaveAs.cpp
UnitWOPITemplate.cpp tdf#107038 Poco::Timestamp replacement with std::chrono 2019-09-28 12:26:32 +02:00
UnitWOPIVersionRestore.cpp
WhiteBoxTests.cpp Added normalizedViewId to the tests with tilemsg 2019-10-15 18:13:03 +03:00
WopiTestServer.hpp tdf#107038 Poco::Timestamp replacement with std::chrono 2019-09-28 12:26:32 +02:00