[
https://issues.apache.org/jira/browse/CASSANDRA-5435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13660301#comment-13660301
]
Edward Capriolo commented on CASSANDRA-5435:
--------------------------------------------
I get it that all the other thrifts tests are written in python. but... The
instructions here are not right.
http://wiki.apache.org/cassandra/HowToContribute
And I have installed all this python stuff and the tests are not working, out
of the box.
{noformat}
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
======================================================================
ERROR: system.test_thrift_server.TestMutations.test_bad_batch_calls
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
self.runTest(result)
File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
test(result)
File "/usr/lib64/python2.7/unittest/case.py", line 429, in __call__
return self.run(*args, **kwds)
File "/usr/lib64/python2.7/unittest/case.py", line 362, in run
result.addError(self, sys.exc_info())
File "/usr/lib/python2.7/site-packages/nose/proxy.py", line 131, in addError
formatted = plugins.formatError(self.test, err)
File "/usr/lib/python2.7/site-packages/nose/plugins/manager.py", line 94, in
__call__
return self.call(*arg, **kw)
File "/usr/lib/python2.7/site-packages/nose/plugins/manager.py", line 136, in
chain
result = meth(*arg, **kw)
File "/usr/lib/python2.7/site-packages/nose/plugins/capture.py", line 81, in
formatError
return (ec, self.addCaptureToErr(ev, output), tb)
File "/usr/lib/python2.7/site-packages/nose/plugins/capture.py", line 106, in
addCaptureToErr
output, ln(u'>> end captured stdout <<')])
TypeError: sequence item 0: expected string or Unicode, exceptions.SystemExit
found
{noformat}
This is what I am trying to add.
{noformat}
[edward@jackintosh system]$ diff test_thrift_server.py
/tmp/test_thrift_server.py
221a222,238
> def test_range_tombstone(self):
> _set_keyspace('Keyspace1')
> client.insert('keyrange1', ColumnParent('Standard1'), Column('a',
> 'a', 0), ConsistencyLevel.ONE)
> client.insert('keyrange1', ColumnParent('Standard1'), Column('b',
> 'b', 0), ConsistencyLevel.ONE)
> client.insert('keyrange1', ColumnParent('Standard1'), Column('c',
> 'c', 0), ConsistencyLevel.ONE)
> client.insert('keyrange1', ColumnParent('Standard1'), Column('d',
> 'd', 0), ConsistencyLevel.ONE)
> update_map = {'keyrange1': {'Standard1': [
>
> Mutation(deletion=Deletion(predicate=SlicePredicate(slice_range=SliceRange('b',
> 'c', False, 1000)))),
> ]}}
> client.batch_mutate(update_map, ConsistencyLevel.ONE)
> p = SlicePredicate(slice_range=SliceRange('', '', False, 10))
> column_parent = ColumnParent('Standard1')
> slice = [result.column
> for result in client.get_slice('keyrange1', column_parent,
> p, ConsistencyLevel.ONE)]
> assert slice == [Column('a', 'a', 0), Column('c', 'c', 0),
> Column('d', 'd', 0)], slice
>
>
{noformat}
I'm not a python developer.
The python steps in the documentation are not correct.
I have other stuff to do in life, then struggle with python.
Q. Is it really necessary that we test a Java project in using python? Don't
the current Java tests work and prove the feature works?
> Support range tombstones from thrift
> ------------------------------------
>
> Key: CASSANDRA-5435
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5435
> Project: Cassandra
> Issue Type: New Feature
> Components: API
> Reporter: Edward Capriolo
> Assignee: Edward Capriolo
> Priority: Minor
>
> I see a RangeTomstone test and methods in row mutation. However thrift's
> validate method throws exception when Deletion's have a slice predicate.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira