bdd: Decrease timeouts if not on CI.
This commit is contained in:
parent
ada4b669bc
commit
d71618031d
@ -212,7 +212,7 @@ class QuteProc(testprocess.Process):
|
|||||||
message=message)
|
message=message)
|
||||||
line.expected = True
|
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.
|
"""Override testprocess.wait_for to check past messages.
|
||||||
|
|
||||||
self._data is cleared after every test to provide at least some
|
self._data is cleared after every test to provide at least some
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
"""Base class for a subprocess run for tests.."""
|
"""Base class for a subprocess run for tests.."""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
import os
|
||||||
import time
|
import time
|
||||||
import fnmatch
|
import fnmatch
|
||||||
|
|
||||||
@ -215,7 +216,7 @@ class Process(QObject):
|
|||||||
else:
|
else:
|
||||||
return value == expected
|
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.
|
"""Wait until a given value is found in the data.
|
||||||
|
|
||||||
Keyword arguments to this function get interpreted as attributes of the
|
Keyword arguments to this function get interpreted as attributes of the
|
||||||
@ -225,6 +226,11 @@ class Process(QObject):
|
|||||||
Return:
|
Return:
|
||||||
The matched line.
|
The matched line.
|
||||||
"""
|
"""
|
||||||
|
if timeout is None:
|
||||||
|
if 'CI' in os.environ:
|
||||||
|
timeout = 15000
|
||||||
|
else:
|
||||||
|
timeout = 5000
|
||||||
# Search existing messages
|
# Search existing messages
|
||||||
for line in self._data:
|
for line in self._data:
|
||||||
matches = []
|
matches = []
|
||||||
|
Loading…
Reference in New Issue
Block a user