def test_timeout(self):
        def check(result):
            self.assertIsInstance(result, errors.Failure)
            self.assert_(str(result.value).startswith("Timeout"),
                    "Wrong error, got: %s" % result.value)

        deferred = self.startQuery(
                sql='lock table test in exclusive mode',
                timeout=0.5)
        deferred.addBoth(check)
        return deferred
dataset/ETHPy150Open marineam/nagcat/python/nagcat/unittests/queries/test_oracle.py/TimeoutQueryTestCase.test_timeout/original