From d994ee3f9bb6069270bd3e6ec480cf118e234568 Mon Sep 17 00:00:00 2001 From: Irina Kaplounova Date: Thu, 7 Aug 2014 11:21:07 -0700 Subject: [PATCH] Addressing code review comments --- tests/integration/__init__.py | 13 +------------ tests/integration/standard/test_query.py | 11 +++++++++-- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index 1cc68c52..b55bf17c 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -179,7 +179,7 @@ def setup_test_keyspace(): try: results = session.execute("SELECT keyspace_name FROM system.schema_keyspaces") existing_keyspaces = [row[0] for row in results] - for ksname in ('test1rf', 'test2rf', 'test3rf', 'lightw'): + for ksname in ('test1rf', 'test2rf', 'test3rf'): if ksname in existing_keyspaces: session.execute("DROP KEYSPACE %s" % ksname) @@ -204,17 +204,6 @@ def setup_test_keyspace(): v int )''' session.execute(ddl) - ddl = ''' - CREATE KEYSPACE lightw - WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}''' - session.execute(ddl) - - ddl = ''' - CREATE TABLE lightw.test ( - k int PRIMARY KEY, - v int )''' - session.execute(ddl) - except Exception: traceback.print_exc() raise diff --git a/tests/integration/standard/test_query.py b/tests/integration/standard/test_query.py index f79b607d..01910e1f 100644 --- a/tests/integration/standard/test_query.py +++ b/tests/integration/standard/test_query.py @@ -373,11 +373,18 @@ class LightweightTransactionsTests(unittest.TestCase): self.cluster = Cluster(protocol_version=PROTOCOL_VERSION) self.session = self.cluster.connect() + ddl = ''' + CREATE TABLE test3rf.lwt ( + k int PRIMARY KEY, + v int )''' + self.session.execute(ddl) + def tearDown(self): """ Shutdown cluster """ + self.session.execute("DROP TABLE test3rf.lwt") self.cluster.shutdown() @@ -389,8 +396,8 @@ class LightweightTransactionsTests(unittest.TestCase): Default value is 1000 """ ok = True - insert_statement = self.session.prepare("INSERT INTO lightw.test (k, v) VALUES (0, 0) IF NOT EXISTS") - delete_statement = self.session.prepare("DELETE FROM lightw.test WHERE k = 0 IF EXISTS") + insert_statement = self.session.prepare("INSERT INTO test3rf.lwt (k, v) VALUES (0, 0) IF NOT EXISTS") + delete_statement = self.session.prepare("DELETE FROM test3rf.lwt WHERE k = 0 IF EXISTS") iterations = int(os.getenv("LWT_ITERATIONS", 1000)) print("Started test for %d iterations" % iterations)