You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2013/05/06 00:58:05 UTC
[1/2] git commit: Ninja-fix 1.2 system tests
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 <al...@apache.org>
Authored: Mon May 6 01:56:25 2013 +0300
Committer: Aleksey Yeschenko <al...@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])
[2/2] git commit: Ninja-unify 1.1/1.2/2.0 system tests
Posted by al...@apache.org.
Ninja-unify 1.1/1.2/2.0 system tests
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/81e19fc7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/81e19fc7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/81e19fc7
Branch: refs/heads/cassandra-1.2
Commit: 81e19fc78b321ee37fa0cb79e53a9b0546b3c69d
Parents: ac1d7ee
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Mon May 6 00:59:10 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Mon May 6 01:56:43 2013 +0300
----------------------------------------------------------------------
test/cassandra.in.sh | 2 +-
test/system/__init__.py | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/81e19fc7/test/cassandra.in.sh
----------------------------------------------------------------------
diff --git a/test/cassandra.in.sh b/test/cassandra.in.sh
index 682327f..936f47d 100644
--- a/test/cassandra.in.sh
+++ b/test/cassandra.in.sh
@@ -39,7 +39,7 @@ JVM_OPTS=" \
-Xrunjdwp:transport=dt_socket,server=y,address=8898,suspend=n \
-Xms128M \
-Xmx1G \
- -Xss128k \
+ -Xss180k \
-XX:SurvivorRatio=8 \
-XX:TargetSurvivorRatio=90 \
-XX:+AggressiveOpts \
http://git-wip-us.apache.org/repos/asf/cassandra/blob/81e19fc7/test/system/__init__.py
----------------------------------------------------------------------
diff --git a/test/system/__init__.py b/test/system/__init__.py
index d9b88ee..669bf6d 100644
--- a/test/system/__init__.py
+++ b/test/system/__init__.py
@@ -65,14 +65,14 @@ class BaseTester(object):
if os.path.exists(pid_fname):
pid_path = os.path.join(root, pid_fname)
print "Unclean shutdown detected, (%s found)" % pid_path
- sys.exit()
+ raise Exception('damn it')
# clean out old stuff
import shutil
# todo get directories from conf/cassandra.yaml
for dirname in ['system', 'data', 'commitlog']:
try:
- shutil.rmtree('build/test/cassandra/' + dirname)
+ shutil.rmtree(os.path.join(root, 'build', 'test', 'cassandra', dirname))
except OSError:
pass
# start the server
@@ -103,7 +103,7 @@ class BaseTester(object):
stdout_value, stderr_value = process.communicate()
print "Stdout: %s" % (stdout_value)
print "Stderr: %s" % (stderr_value)
- sys.exit()
+ raise Exception('damn it')
else:
try:
self.open_client()
@@ -132,6 +132,8 @@ class BaseTester(object):
if not is_alive(spid):
break
slept += 0.5
+ # Give time for cassandra to shutdown
+ time.sleep(2)
if (slept > max_wait and is_alive(spid)):
os.kill(spid, signal.SIGKILL)
fpath = os.path.join(root, pid_fname)