[ 
https://issues.apache.org/jira/browse/CASSANDRA-14050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17074829#comment-17074829
 ] 

Stefania Alborghetti commented on CASSANDRA-14050:
--------------------------------------------------

[~sasrira] are you still working on this? If not, [~Gerrrr] and I would like to 
take over. We would like to fix these tests before merging CASSANDRA-15679.

The reason for the failures is that the _cqlsh copy tests.py_ links to 
_cqlshlib/formatting.py_. It needs this in order to apply the identical 
formatting used by cqlsh and determine if the data obtained via 
{{self.session.execute("SELECT * FROM testtuple")}} matches the data in the csv 
files.

Since cqlshlib on trunk supports both python 3 and python 2, then the cqlsh 
copy tests work for trunk. But for older branches that only support python 2, 
the tests no longer work.

So to fix the tests we would need to make cqlshlib support both python 2 and 
python 3, at least as far as _formatting.py_. There is a problem with this 
approach though: this code is mostly tested via dtests, which only support 
python 3 (I assume this is the case because of the dependency on Python 3) and 
therefore, how would we know if we broke anything for Python 2? Maybe we could 
run the dtests from before the migration to python 3, hoping that they still 
work.

Another approach would be to copy formatting.py into the dtests repo for the 
older branches but this is quite ugly.

Lastly, there is the option of removing the dependency to _formatting.py_. I 
think we could try replacing {{self.session.execute("SELECT * FROM 
testtuple")}} with the equivalent cqlsh command and see if that works.



> Many cqlsh_copy_tests are busted
> --------------------------------
>
>                 Key: CASSANDRA-14050
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14050
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Legacy/Testing
>            Reporter: Michael Kjellman
>            Assignee: Sam Sriramadhesikan
>            Priority: Normal
>
> Many cqlsh_copy_tests are busted. We should disable the entire suite until 
> this is resolved as these tests are currently nothing but a waste of time.
> test_bulk_round_trip_blogposts - cqlsh_tests.cqlsh_copy_tests.CqlshCopyTest
> test_bulk_round_trip_blogposts_with_max_connections - 
> cqlsh_tests.cqlsh_copy_tests.CqlshCopyTest
> test_bulk_round_trip_default - cqlsh_tests.cqlsh_copy_tests.CqlshCopyTest
> Error starting node3.
> -------------------- >> begin captured logging << --------------------
> dtest: DEBUG: cluster ccm directory: /tmp/dtest-S9NfIH
> dtest: DEBUG: Done setting configuration options:
> {   'initial_token': None,
>     'memtable_allocation_type': 'offheap_objects',
>     'num_tokens': '256',
>     'phi_convict_threshold': 5,
>     'range_request_timeout_in_ms': 10000,
>     'read_request_timeout_in_ms': 10000,
>     'request_timeout_in_ms': 10000,
>     'truncate_request_timeout_in_ms': 10000,
>     'write_request_timeout_in_ms': 10000}
> --------------------- >> end captured logging << ---------------------
>   File "/usr/lib/python2.7/unittest/case.py", line 329, in run
>     testMethod()
>   File "/home/cassandra/cassandra-dtest/cqlsh_tests/cqlsh_copy_tests.py", 
> line 2546, in test_bulk_round_trip_blogposts
>     stress_table='stresscql.blogposts')
>   File "/home/cassandra/cassandra-dtest/cqlsh_tests/cqlsh_copy_tests.py", 
> line 2451, in _test_bulk_round_trip
>     self.prepare(nodes=nodes, partitioner=partitioner, 
> configuration_options=configuration_options)
>   File "/home/cassandra/cassandra-dtest/cqlsh_tests/cqlsh_copy_tests.py", 
> line 115, in prepare
>     self.cluster.populate(nodes, 
> tokens=tokens).start(wait_for_binary_proto=True)
>   File 
> "/home/cassandra/env/local/lib/python2.7/site-packages/ccmlib/cluster.py", 
> line 423, in start
>     raise NodeError("Error starting {0}.".format(node.name), p)
> "Error starting node3.\n-------------------- >> begin captured logging << 
> --------------------\ndtest: DEBUG: cluster ccm directory: 
> /tmp/dtest-S9NfIH\ndtest: DEBUG: Done setting configuration options:\n{   
> 'initial_token': None,\n    'memtable_allocation_type': 'offheap_objects',\n  
>   'num_tokens': '256',\n    'phi_convict_threshold': 5,\n    
> 'range_request_timeout_in_ms': 10000,\n    'read_request_timeout_in_ms': 
> 10000,\n    'request_timeout_in_ms': 10000,\n    
> 'truncate_request_timeout_in_ms': 10000,\n    'write_request_timeout_in_ms': 
> 10000}\n--------------------- >> end captured logging << 
> ---------------------"



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to