Commit b4317e4e authored by Julien Muchembled's avatar Julien Muchembled

qa: fix test_max_allowed_packet (testStorageMySQL)

It started to fail with commit fd007f5d.
parent 9fcff73e
......@@ -96,9 +96,11 @@ class StorageMySQLdbTests(StorageDBTests):
assert len(x) + EXTRA == self.db._max_allowed_packet
self.assertRaises(DatabaseFailure, self.db.query, x + ' ')
# Reconnection cleared the cache of the config table,
# so fill it again with required values before we patch query().
# Check MySQLDatabaseManager._max_allowed_packet
query_list = []
query = self.db.query
self.db.query = lambda query: query_list.append(EXTRA + len(query))
self.assertEqual(2, max(len(self.db.escape(chr(x)))
for x in xrange(256)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment