Skip to content

Commit 9ccbe17

Browse files
committed
Increase some test timeouts to handle when Travis is slow
1 parent 63cc762 commit 9ccbe17

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

tests/src/python/test_qgsactionmanager.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -203,26 +203,26 @@ def testDoAction(self):
203203

204204
c = QgsExpressionContext()
205205
self.manager.doAction(0, f, c)
206-
time.sleep(0.05)
206+
time.sleep(0.5)
207207

208208
self.assertEqual(self.check_action_result(temp_file), 'test output')
209209

210210
# action with substitutions
211211
temp_file = self.get_temp_filename()
212212
self.manager.addAction(QgsAction.Unix, 'test_action', self.create_action(temp_file, 'test [% $id %] output [% @layer_name %]'))
213213
self.manager.doAction(1, f, c)
214-
time.sleep(0.05)
214+
time.sleep(0.5)
215215

216216
self.assertEqual(self.check_action_result(temp_file), 'test 1 output test_layer')
217217

218218
# test doAction using field variant
219219
temp_file = self.get_temp_filename()
220220
self.manager.addAction(QgsAction.Unix, 'test_action', self.create_action(temp_file, 'test [% @current_field %]'))
221221
self.manager.doActionFeature(2, f, 0)
222-
time.sleep(0.05)
222+
time.sleep(0.5)
223223
self.assertEqual(self.check_action_result(temp_file), 'test 5')
224224
self.manager.doActionFeature(2, f, 1)
225-
time.sleep(0.05)
225+
time.sleep(0.5)
226226
self.assertEqual(self.check_action_result(temp_file), 'test val')
227227

228228
if __name__ == '__main__':

tests/src/python/test_qgsappstartup.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def tearDownClass(cls):
5151
# TODO: refactor parameters to **kwargs to handle all startup combinations
5252
def doTestStartup(self, option='', testDir='', testFile='',
5353
loadPlugins=False, customization=False,
54-
timeOut=270, env=None, additionalArguments=[]):
54+
timeOut=360, env=None, additionalArguments=[]):
5555
"""Run QGIS with the given option. Wait for testFile to be created.
5656
If time runs out, fail.
5757
"""
@@ -106,14 +106,14 @@ def testOptionsPath(self):
106106
self.doTestStartup(option="--optionspath",
107107
testDir=os.path.join(self.TMP_DIR, p),
108108
testFile=ini,
109-
timeOut=270)
109+
timeOut=360)
110110

111111
def testConfigPath(self):
112112
for p in ['test_config', 'test config', u'test_configé€']:
113113
self.doTestStartup(option="--configpath",
114114
testDir=os.path.join(self.TMP_DIR, p),
115115
testFile="qgis.db",
116-
timeOut=270)
116+
timeOut=360)
117117

118118
def testPluginPath(self):
119119
for t in ['test_plugins', 'test plugins', u'test_pluginsé€']:
@@ -138,7 +138,7 @@ def testPluginPath(self):
138138
option="--optionspath",
139139
testDir=testDir,
140140
testFile="plugin_started.txt",
141-
timeOut=270,
141+
timeOut=360,
142142
loadPlugins=True,
143143
env={'QGIS_PLUGINPATH': testDir})
144144

@@ -158,7 +158,7 @@ def testPyQgisStartupEnvVar(self):
158158
f.close()
159159
self.doTestStartup(
160160
testFile=testfilepath,
161-
timeOut=270,
161+
timeOut=360,
162162
env={'PYQGIS_STARTUP': testmod})
163163

164164
def testOptionsAsFiles(self):
@@ -169,12 +169,12 @@ def testOptionsAsFiles(self):
169169
self.doTestStartup(option="--configpath",
170170
testDir=os.path.join(self.TMP_DIR, 'test_optionsAsFiles'),
171171
testFile="qgis.db",
172-
timeOut=270,
172+
timeOut=360,
173173
additionalArguments=['--help'])
174174
self.doTestStartup(option="--configpath",
175175
testDir=os.path.join(self.TMP_DIR, 'test_optionsAsFiles'),
176176
testFile="qgis.db",
177-
timeOut=270,
177+
timeOut=360,
178178
additionalArguments=['--', '--help'])
179179

180180

0 commit comments

Comments
 (0)