cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] git commit: Ninja-fix 1.2 system tests
Date Sun, 05 May 2013 22:58:05 GMT
Updated Branches:
  refs/heads/cassandra-1.2 ac1d7ee1c -> 68da4b468


Ninja-fix 1.2 system tests


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/68da4b46
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/68da4b46
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/68da4b46

Branch: refs/heads/cassandra-1.2
Commit: 68da4b468983fc54f4681cc5e57a13dba0cb4c8a
Parents: 81e19fc
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Mon May 6 01:56:25 2013 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Mon May 6 01:56:43 2013 +0300

----------------------------------------------------------------------
 test/system/test_thrift_server.py |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/68da4b46/test/system/test_thrift_server.py
----------------------------------------------------------------------
diff --git a/test/system/test_thrift_server.py b/test/system/test_thrift_server.py
index bcb75e8..a23ecd0 100644
--- a/test/system/test_thrift_server.py
+++ b/test/system/test_thrift_server.py
@@ -964,8 +964,7 @@ class TestMutations(ThriftTester):
             client.insert(key, ColumnParent('Standard1'), Column(key, 'v', 0), ConsistencyLevel.ONE)
 
         slices = get_range_slice(client, ColumnParent('Standard1'), SlicePredicate(column_names=['-a',
'-a']), '', '', 1000, ConsistencyLevel.ONE)
-        # note the collated ordering rather than ascii
-        L = ['0', '1', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '2', '20',
'21', '22', '23', '24', '25', '26', '27','28', '29', '3', '30', '31', '32', '33', '34', '35',
'36', '37', '38', '39', '4', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '5',
'50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '6', '60', '61', '62', '63', '64',
'65', '66', '67', '68', '69', '7', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79',
'8', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '9', '90', '91', '92', '93',
'94', '95', '96', '97', '98', '99', 'a', '-a', 'b', '-b']
+        L = ['-a', '-b', '0', '1', '10', '11', '12', '13', '14', '15', '16', '17', '18',
'19', '2', '20', '21', '22', '23', '24', '25', '26', '27','28', '29', '3', '30', '31', '32',
'33', '34', '35', '36', '37', '38', '39', '4', '40', '41', '42', '43', '44', '45', '46', '47',
'48', '49', '5', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '6', '60', '61',
'62', '63', '64', '65', '66', '67', '68', '69', '7', '70', '71', '72', '73', '74', '75', '76',
'77', '78', '79', '8', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '9', '90',
'91', '92', '93', '94', '95', '96', '97', '98', '99', 'a', 'b']
         assert len(slices) == len(L)
         for key, ks in zip(L, slices):
             assert key == ks.key
@@ -982,10 +981,10 @@ class TestMutations(ThriftTester):
                 assert key == ks.key
         
         slices = get_range_slice(client, ColumnParent('Standard1'), SlicePredicate(column_names=['-a',
'-a']), 'a', '', 1000, ConsistencyLevel.ONE)
-        check_slices_against_keys(['a', '-a', 'b', '-b'], slices)
+        check_slices_against_keys(['a', 'b'], slices)
         
         slices = get_range_slice(client, ColumnParent('Standard1'), SlicePredicate(column_names=['-a',
'-a']), '', '15', 1000, ConsistencyLevel.ONE)
-        check_slices_against_keys(['0', '1', '10', '11', '12', '13', '14', '15'], slices)
+        check_slices_against_keys(['-a', '-b', '0', '1', '10', '11', '12', '13', '14', '15'],
slices)
 
         slices = get_range_slice(client, ColumnParent('Standard1'), SlicePredicate(column_names=['-a',
'-a']), '50', '51', 1000, ConsistencyLevel.ONE)
         check_slices_against_keys(['50', '51'], slices)
@@ -1110,7 +1109,7 @@ class TestMutations(ThriftTester):
         assert [row.key for row in result] == ['a', 'b', 'c', 'd', 'e',], [row.key for row
in result]
 
         result = client.get_range_slices(cp, SlicePredicate(column_names=['col1', 'col3']),
KeyRange(start_token=copp_token('c'), end_token=copp_token('c')), ConsistencyLevel.ONE)
-        assert [row.key for row in result] == ['d', 'e', 'a', 'b', 'c',], [row.key for row
in result]
+        assert [row.key for row in result] == ['a', 'b', 'c', 'd', 'e',], [row.key for row
in result]
         
 
     def test_get_slice_by_names(self):
@@ -1194,7 +1193,7 @@ class TestMutations(ThriftTester):
 
     def test_describe_keyspace(self):
         kspaces = client.describe_keyspaces()
-        assert len(kspaces) == 3, kspaces # ['Keyspace2', 'Keyspace1', 'system']
+        assert len(kspaces) == 5, kspaces # ['Keyspace2', 'Keyspace1', 'system', 'system_traces',
'system_auth']
 
         sysks = client.describe_keyspace("system")
         assert sysks in kspaces
@@ -1227,7 +1226,7 @@ class TestMutations(ThriftTester):
 
     def test_describe_partitioner(self):
         # Make sure this just reads back the values from the config.
-        assert client.describe_partitioner() == "org.apache.cassandra.dht.CollatingOrderPreservingPartitioner"
+        assert client.describe_partitioner() == "org.apache.cassandra.dht.ByteOrderedPartitioner"
 
     def test_describe_snitch(self):
         assert client.describe_snitch() == "org.apache.cassandra.locator.SimpleSnitch"
@@ -1397,7 +1396,6 @@ class TestMutations(ThriftTester):
         ks1 = client.describe_keyspace('Keyspace1')
         assert 'NewColumnFamily' in [x.name for x in ks1.cf_defs]
         cfid = [x.id for x in ks1.cf_defs if x.name=='NewColumnFamily'][0]
-        assert cfid > 1000
         
         # modify invalid
         modified_cf = CfDef('Keyspace1', 'NewColumnFamily', column_metadata=[cd])


Mime
View raw message