Example #1
0
    def testTimeout(self):
        """
        Asserts that we will not deadlock if more iterators are opened in parallel than
        available in the connection pool
        """
        request = QgsFeatureRequest()
        request.setTimeout(1)

        iterators = list()
        for i in range(100):
            iterators.append(self.vl.getFeatures(request))
Example #2
0
 def testTimeout(self):
     req = QgsFeatureRequest()
     self.assertEqual(req.timeout(), -1)
     req.setTimeout(6)
     self.assertEqual(req.timeout(), 6)