Skip to content

Commit e50a8aa

Browse files
committedOct 19, 2017
Split WMS tests to detect flaky behavior
1 parent e7d7295 commit e50a8aa

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed
 

‎tests/src/python/test_qgsserver_wms.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,16 @@ def wms_request_compare(self, request, extra=None, reference_file=None):
6464

6565
self.assertXMLEqual(response, expected, msg="request %s failed.\nQuery: %s\nExpected file: %s\nResponse:\n%s" % (query_string, request, reference_path, response.decode('utf-8')))
6666

67-
@unittest.skipIf(os.environ.get('TRAVIS', '') == 'true', 'Test is flaky on Travis environment')
68-
def test_project_wms(self):
69-
"""Test some WMS request"""
70-
for request in ('GetCapabilities', 'GetProjectSettings', 'GetContext'):
71-
self.wms_request_compare(request)
67+
def test_getcapabilities(self):
68+
self.wms_request_compare('GetCapabilities')
69+
70+
def test_getprojectsettings(self):
71+
self.wms_request_compare('GetProjectSettings')
7272

73+
def test_getcontext(self):
74+
self.wms_request_compare('GetContext')
75+
76+
def test_getfeatureinfo(self):
7377
# Test getfeatureinfo response xml
7478
self.wms_request_compare('GetFeatureInfo',
7579
'&layers=testlayer%20%C3%A8%C3%A9&styles=&' +
@@ -174,11 +178,14 @@ def test_project_wms(self):
174178
'FEATURE_COUNT=10&FILTER_GEOM=POLYGON((8.2035381 44.901459,8.2035562 44.901459,8.2035562 44.901418,8.2035381 44.901418,8.2035381 44.901459))',
175179
'wms_getfeatureinfo_invalid_query_layers')
176180

181+
def test_describelayer(self):
177182
# Test DescribeLayer
178183
self.wms_request_compare('DescribeLayer',
179184
'&layers=testlayer%20%C3%A8%C3%A9&' +
180185
'SLD_VERSION=1.1.0',
181186
'describelayer')
187+
188+
def test_getstyles(self):
182189
# Test GetStyles
183190
self.wms_request_compare('GetStyles',
184191
'&layers=testlayer%20%C3%A8%C3%A9&',

0 commit comments

Comments
 (0)
Please sign in to comment.