Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable test_rollback after bug fix #119

Merged
merged 1 commit into from
Oct 29, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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