mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 09:52:37 +02:00
tests: Do not let LibreOffice hang on the large test set
Some of the files in our large test set can make LibreOffice hang. We do not have a proper solution for this yet, but we can at least make the tests timeout quickly, so that they can finish at some point. Refs #878
This commit is contained in:
parent
3f86e7b465
commit
cfb5e75be9
1 changed files with 6 additions and 1 deletions
|
@ -75,7 +75,12 @@ class TestLargeSet(TestCli):
|
|||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
)
|
||||
out, _ = p.communicate()
|
||||
try:
|
||||
# Set a global timeout of 5 minutes for the processing of a document.
|
||||
# This is hacky way to sidestep https://github.com/freedomofpress/dangerzone/issues/878
|
||||
out, _ = p.communicate(timeout=5 * 60)
|
||||
except subprocess.TimeoutExpired:
|
||||
print(f"*** TIMEOUT EXCEEDED FOR DOCUMENT '{doc}' ***")
|
||||
from strip_ansi import strip_ansi
|
||||
|
||||
print(strip_ansi(out.decode()))
|
||||
|
|
Loading…
Reference in a new issue