Skip to content
Permalink
Browse files

Enable WFS test with a fix to prevent crash on exit (#3774)

* Revert "Disable failing PyQgsOfflineEditingWFS test"

This reverts commit 33ee514.

* Let lifetime of layers be controlled by QGIS
  • Loading branch information
m-kuhn committed Nov 21, 2016
1 parent ee71077 commit 22dc09669299a4c24d45b9201c6bf346cd276974
Showing with 8 additions and 2 deletions.
  1. +1 −1 ci/travis/linux/script.sh
  2. +7 −1 tests/src/python/test_offline_editing_wfs.py
@@ -25,5 +25,5 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export OTB_APPLICATION_PATH=${HOME}/OTB-5.6.0-Linux64/lib/otb/applications
export LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so

xvfb-run ctest -V -E "qgis_filedownloader|qgis_openstreetmaptest|qgis_wcsprovidertest|PyQgsWFSProviderGUI|PyQgsOfflineEditingWFS|qgis_ziplayertest|$(cat ${DIR}/blacklist.txt | paste -sd '|' -)" -S ./qgis-test-travis.ctest --output-on-failure
xvfb-run ctest -V -E "qgis_filedownloader|qgis_openstreetmaptest|qgis_wcsprovidertest|PyQgsWFSProviderGUI|qgis_ziplayertest|$(cat ${DIR}/blacklist.txt | paste -sd '|' -)" -S ./qgis-test-travis.ctest --output-on-failure
# xvfb-run ctest -V -E "qgis_openstreetmaptest|qgis_wcsprovidertest" -S ./qgis-test-travis.ctest --output-on-failure
@@ -37,7 +37,11 @@
import tempfile
from time import sleep
from utilities import unitTestDataPath, waitServer
from qgis.core import QgsVectorLayer
from qgis.core import (
QgsVectorLayer,
QgsMapLayerRegistry,
QgsAuthManager
)

from qgis.testing import (
start_app,
@@ -133,6 +137,7 @@ def _getOnlineLayer(self, type_name, layer_name=None):
self.counter += 1
uri = ' '.join([("%s='%s'" % (k, v)) for k, v in list(parms.items())])
wfs_layer = QgsVectorLayer(uri, layer_name, 'WFS')
wfs_layer.setParent(QgsAuthManager.instance())
assert wfs_layer.isValid()
return wfs_layer

@@ -143,6 +148,7 @@ def _getLayer(cls, layer_name):
"""
path = cls.testdata_path + layer_name + '.shp'
layer = QgsVectorLayer(path, layer_name, "ogr")
layer.setParent(QgsAuthManager.instance())
assert layer.isValid()
return layer

0 comments on commit 22dc096

Please sign in to comment.
You can’t perform that action at this time.