vcl/osx/salinst.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit 2ecb909f9af885ed818fd2f41293d39b780fb385 Author: Patrick Luby <[email protected]> AuthorDate: Mon Sep 11 10:37:07 2023 -0400 Commit: Patrick Luby <[email protected]> CommitDate: Wed Sep 20 16:12:45 2023 +0200 attempt to fix macos jenkins hangs - part 3 oox::xls::WorkbookFragment::finalizeImport() calls AquaSalInstance::DoYield() with bWait set to true. But since unit tests generally have no expected user generated events, we can end up blocking and waiting forever so don't block and wait when running unit tests. Change-Id: I14cfdb88f04b82f49e8c15e554e5c4b4053e77b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156826 Tested-by: Jenkins Reviewed-by: Patrick Luby <[email protected]> (cherry picked from commit 26313599b0eae3b397bb341c63d185f8771af82d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157115 diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index f2ba3b59fb25..be33e8ac9902 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -623,8 +623,14 @@ bool AquaSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) { SolarMutexReleaser aReleaser; + // attempt to fix macos jenkins hangs - part 3 + // oox::xls::WorkbookFragment::finalizeImport() calls + // AquaSalInstance::DoYield() with bWait set to true. But + // since unit tests generally have no expected user generated + // events, we can end up blocking and waiting forever so + // don't block and wait when running unit tests. pEvent = [NSApp nextEventMatchingMask: NSEventMaskAny - untilDate: [NSDate distantFuture] + untilDate: SalInstance::IsRunningUnitTest() ? [NSDate distantPast] : [NSDate distantFuture] inMode: NSDefaultRunLoopMode dequeue: YES]; if( pEvent )
