summaryrefslogtreecommitdiff
path: root/test/source/bootstrapfixture.cxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-10-06 12:53:05 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2017-10-06 19:21:19 +0200
commit141fe1c5e7fbf67a083b34e49e19b6ea78a0eb2b (patch)
treeaf5fe19bee951a0987f742971e2f82e1b3f20c3e /test/source/bootstrapfixture.cxx
parentf4cbd31465d3737855e694b7341fb3bc063d63c4 (diff)
Process all pending events during Cppunit setUp
Larger unit tests collect a lot of events, which are just processed on shutdown. But since the Scheduler is just an unsorted linked list, processing these in order is O(n^2) for lookup, which really adds up, e.g. sw_ooxmlexport8 has 35047 tasks on shutdown. So this just processes all pending events before running each unit test. Also adds missing spellchecking components to some calc tests. Change-Id: Icf12146015afc17a1f52f79c18f248b72650ad46 Reviewed-on: https://gerrit.libreoffice.org/43199 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'test/source/bootstrapfixture.cxx')
-rw-r--r--test/source/bootstrapfixture.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index 415292bd2a26..a195db529d71 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -31,6 +31,7 @@
#include <unotools/syslocaleoptions.hxx>
#include <osl/file.hxx>
#include <unotools/tempfile.hxx>
+#include <vcl/scheduler.hxx>
#include <isheadless.hxx>
@@ -104,6 +105,10 @@ void test::BootstrapFixture::setUp()
test::BootstrapFixtureBase::setUp();
test_init_impl(m_bAssertOnDialog, m_bNeedUCB, m_xSFactory.get());
+
+#if OSL_DEBUG_LEVEL > 0
+ Scheduler::ProcessEventsToIdle();
+#endif
}
test::BootstrapFixture::~BootstrapFixture()