You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2009/04/29 21:13:43 UTC
svn commit: r769883 - /incubator/cassandra/trunk/test/system/test_server.py
Author: jbellis
Date: Wed Apr 29 19:13:43 2009
New Revision: 769883
URL: http://svn.apache.org/viewvc?rev=769883&view=rev
Log:
add tests for batch_insert_superColumn and the _blocking version. patch by jbellis.
Modified:
incubator/cassandra/trunk/test/system/test_server.py
Modified: incubator/cassandra/trunk/test/system/test_server.py
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/test/system/test_server.py?rev=769883&r1=769882&r2=769883&view=diff
==============================================================================
--- incubator/cassandra/trunk/test/system/test_server.py (original)
+++ incubator/cassandra/trunk/test/system/test_server.py Wed Apr 29 19:13:43 2009
@@ -39,8 +39,8 @@
client.insert('Table1', 'key1', 'Super1:sc2:c6', 'value6', 0)
time.sleep(0.1)
-def _verify_super():
- assert client.get_column('Table1', 'key1', 'Super1:sc1:c4') == \
+def _verify_super(supercolumn='Super1'):
+ assert client.get_column('Table1', 'key1', supercolumn + ':sc1:c4') == \
column_t(columnName='c4', value='value4', timestamp=0)
slice = client.get_slice_super('Table1', 'key1', 'Super1', -1, -1)
assert slice == _SUPER_COLUMNS, slice
@@ -89,6 +89,21 @@
_insert_batch(client.batch_insert_blocking)
_verify_batch()
+ def test_batch_insert_super(self):
+ cfmap = {'Super1': _SUPER_COLUMNS,
+ 'Super2': _SUPER_COLUMNS}
+ client.batch_insert_superColumn(batch_mutation_t(table='Table1', key='key1', cfmap=cfmap))
+ time.sleep(0.1)
+ _verify_super('Super1')
+ _verify_super('Super2')
+
+ def test_batch_insert_super_blocking(self):
+ cfmap = {'Super1': _SUPER_COLUMNS,
+ 'Super2': _SUPER_COLUMNS}
+ client.batch_insert_superColumn_blocking(batch_mutation_t(table='Table1', key='key1', cfmap=cfmap))
+ _verify_super('Super1')
+ _verify_super('Super2')
+
def test_cf_remove_column(self):
_insert_simple()
client.remove('Table1', 'key1', 'Standard1:c1', 1, True)