add mysql-5.5 error message as possible response to timeout

This makes the test not fail on mysql 5.5

as per: http://groups.google.com/group/vitess/browse_thread/thread/4bb0edc8a5a62b2a
This commit is contained in:
elij 2012-05-07 21:42:51 -07:00
Родитель 056b5e972c
Коммит 1658c77eef
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -256,7 +256,9 @@ class TestNocache(framework.TestCase):
cu.execute("begin", {})
cu.execute("select sleep(2) from vtocc_test", {})
except (db.MySQLErrors.DatabaseError, db.dbexceptions.OperationalError), e:
self.assertContains(e[1], "error: Query")
if "error: Query" not in e[1] and "error: Lost connection" not in e[1]:
print e[1]
self.assertFail("Query not killed as expected")
else:
self.assertFail("Did not receive exception")