Skip to content

Commit

Permalink
Merge pull request #119 from youtube/liguo
Browse files Browse the repository at this point in the history
Enable test_rollback after bug fix
  • Loading branch information
guoliang100 committed Oct 29, 2014
2 parents 3f2be6e + 9b18de3 commit b82f5f1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/vtgatev2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,7 @@ def test_query_routing(self):
logging.debug("failed with error %s, %s" % (str(e), traceback.print_exc()))
raise


def test_rollback(self):
return
try:
vtgate_conn = get_connection()
count = 10
Expand All @@ -275,7 +273,7 @@ def test_rollback(self):
keyranges=[self.keyrange])
kid_list = shard_kid_map[shard_names[self.shard_index]]
for x in xrange(count):
keyspace_id = kid_list[count%len(kid_list)]
keyspace_id = kid_list[x%len(kid_list)]
vtgate_conn._execute(
"insert into vt_insert_test (msg, keyspace_id) values (%(msg)s, %(keyspace_id)s)",
{'msg': 'test %s' % x, 'keyspace_id': keyspace_id},
Expand All @@ -293,10 +291,9 @@ def test_rollback(self):
keyranges=[self.keyrange])[:2]
logging.debug("ROLLBACK TEST rowcount %d count %d" % (rowcount, count))
self.assertEqual(rowcount, count, "Fetched rows(%d) != inserted rows(%d), rollback didn't work" % (rowcount, count))
do_write(10, self.shard_index)
except Exception, e:
logging.debug("Write failed with error %s" % str(e))
raise

self.fail("Write failed with error %s %s" % (str(e), traceback.print_exc()))

def test_execute_entity_ids(self):
try:
Expand Down

0 comments on commit b82f5f1

Please sign in to comment.