cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r986018 - in /cassandra/trunk/test/system: __init__.py test_thrift_server.py
Date Mon, 16 Aug 2010 16:28:48 GMT
Author: jbellis
Date: Mon Aug 16 16:28:48 2010
New Revision: 986018

URL: http://svn.apache.org/viewvc?rev=986018&view=rev
Log:
s/RackUnawareStrategy/SimpleStrategy/ in system tests.  patch by jbellis

Modified:
    cassandra/trunk/test/system/__init__.py
    cassandra/trunk/test/system/test_thrift_server.py

Modified: cassandra/trunk/test/system/__init__.py
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/system/__init__.py?rev=986018&r1=986017&r2=986018&view=diff
==============================================================================
--- cassandra/trunk/test/system/__init__.py (original)
+++ cassandra/trunk/test/system/__init__.py Mon Aug 16 16:28:48 2010
@@ -142,7 +142,7 @@ class ThriftTester(BaseTester):
         self.client.transport.close()
         
     def define_schema(self):
-        keyspace1 = Cassandra.KsDef('Keyspace1', 'org.apache.cassandra.locator.RackUnawareStrategy',
None, 1,
+        keyspace1 = Cassandra.KsDef('Keyspace1', 'org.apache.cassandra.locator.SimpleStrategy',
None, 1,
         [
             Cassandra.CfDef('Keyspace1', 'Standard1'),
             Cassandra.CfDef('Keyspace1', 'Standard2'), 
@@ -156,7 +156,7 @@ class ThriftTester(BaseTester):
             Cassandra.CfDef('Keyspace1', 'Indexed1', column_metadata=[Cassandra.ColumnDef('birthdate',
'LongType', Cassandra.IndexType.KEYS, 'birthdate')]),
         ])
 
-        keyspace2 = Cassandra.KsDef('Keyspace2', 'org.apache.cassandra.locator.RackUnawareStrategy',
None, 1,
+        keyspace2 = Cassandra.KsDef('Keyspace2', 'org.apache.cassandra.locator.SimpleStrategy',
None, 1,
         [
             Cassandra.CfDef('Keyspace2', 'Standard1'),
             Cassandra.CfDef('Keyspace2', 'Standard3'),
@@ -181,8 +181,7 @@ class AvroTester(BaseTester):
         keyspace1 = dict()
         keyspace1['name'] = 'Keyspace1'
         keyspace1['replication_factor'] = 1
-        keyspace1['strategy_class'] = \
-                'org.apache.cassandra.locator.RackUnawareStrategy'
+        keyspace1['strategy_class'] = 'org.apache.cassandra.locator.SimpleStrategy'
 
         keyspace1['cf_defs'] = [{
             'keyspace': 'Keyspace1',

Modified: cassandra/trunk/test/system/test_thrift_server.py
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/system/test_thrift_server.py?rev=986018&r1=986017&r2=986018&view=diff
==============================================================================
--- cassandra/trunk/test/system/test_thrift_server.py (original)
+++ cassandra/trunk/test/system/test_thrift_server.py Mon Aug 16 16:28:48 2010
@@ -1127,7 +1127,7 @@ class TestMutations(ThriftTester):
         
     def test_invalid_ks_names(self):
         def invalid_keyspace():
-            client.system_add_keyspace(KsDef('in-valid', 'org.apache.cassandra.locator.RackUnawareStrategy',
{}, 1, []))
+            client.system_add_keyspace(KsDef('in-valid', 'org.apache.cassandra.locator.SimpleStrategy',
{}, 1, []))
         _expect_exception(invalid_keyspace, InvalidRequestException)
         
         def invalid_rename():
@@ -1144,7 +1144,7 @@ class TestMutations(ThriftTester):
         def invalid_cf_inside_new_ks():
             cf = CfDef('ValidKsName_invalid_cf', 'in-valid')
             _set_keyspace('system')
-            client.system_add_keyspace(KsDef('ValidKsName_invalid_cf', 'org.apache.cassandra.locator.RackUnawareStrategy',
{}, 1, [cf]))
+            client.system_add_keyspace(KsDef('ValidKsName_invalid_cf', 'org.apache.cassandra.locator.SimpleStrategy',
{}, 1, [cf]))
         _expect_exception(invalid_cf_inside_new_ks, InvalidRequestException)
         
         def invalid_rename():
@@ -1155,7 +1155,7 @@ class TestMutations(ThriftTester):
     def test_system_keyspace_operations(self):
         """ Test keyspace (add, drop, rename) operations """
         # create
-        keyspace = KsDef('CreateKeyspace', 'org.apache.cassandra.locator.RackUnawareStrategy',
{}, 1,
+        keyspace = KsDef('CreateKeyspace', 'org.apache.cassandra.locator.SimpleStrategy',
{}, 1,
                          [CfDef('CreateKeyspace', 'CreateKsCf')])
         client.system_add_keyspace(keyspace)
         newks = client.describe_keyspace('CreateKeyspace')
@@ -1179,7 +1179,7 @@ class TestMutations(ThriftTester):
     
     def test_create_then_drop_ks(self):
         keyspace = KsDef('AddThenDrop', 
-                strategy_class='org.apache.cassandra.locator.RackUnawareStrategy',
+                strategy_class='org.apache.cassandra.locator.SimpleStrategy',
                 replication_factor=1,
                 cf_defs=[])
         def test_existence():



Mime
View raw message