From 141fe1c5e7fbf67a083b34e49e19b6ea78a0eb2b Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Fri, 6 Oct 2017 12:53:05 +0200 Subject: 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 Reviewed-by: Jan-Marek Glogowski --- test/source/bootstrapfixture.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') 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 #include #include +#include #include @@ -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() -- cgit