diff --git a/tests/integration/quteprocess.py b/tests/integration/quteprocess.py index ac92d1f00..622c3511d 100644 --- a/tests/integration/quteprocess.py +++ b/tests/integration/quteprocess.py @@ -212,7 +212,7 @@ class QuteProc(testprocess.Process): message=message) line.expected = True - def wait_for(self, timeout=15000, **kwargs): + def wait_for(self, timeout=None, **kwargs): """Override testprocess.wait_for to check past messages. self._data is cleared after every test to provide at least some diff --git a/tests/integration/testprocess.py b/tests/integration/testprocess.py index 4bd016e45..be098169b 100644 --- a/tests/integration/testprocess.py +++ b/tests/integration/testprocess.py @@ -20,6 +20,7 @@ """Base class for a subprocess run for tests..""" import re +import os import time import fnmatch @@ -215,7 +216,7 @@ class Process(QObject): else: return value == expected - def wait_for(self, timeout=15000, **kwargs): + def wait_for(self, timeout=None, **kwargs): """Wait until a given value is found in the data. Keyword arguments to this function get interpreted as attributes of the @@ -225,6 +226,11 @@ class Process(QObject): Return: The matched line. """ + if timeout is None: + if 'CI' in os.environ: + timeout = 15000 + else: + timeout = 5000 # Search existing messages for line in self._data: matches = []