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

Patrick Bannister edited comment on CASSANDRA-10190 at 9/13/19 1:23 AM:
------------------------------------------------------------------------

I'm experimenting with the {{test_cqlsh_completion}} unit tests to try to make 
them faster and more like unit tests. Right now they work more like dtests (as 
do most of the cqlshlib unit tests).

This is not worth holding up the ticket to do, but I'll push the results up to 
the branch if I can finish something before we're ready to proceed.


was (Author: ptbannister):
I'm experimenting with changing the cqlshlib unit tests in 
{{test_cqlsh_completion}}. These are the slowest part of the cqlshlib unit test 
suite. They currently work by running cqlsh in a subprocess to connect to a ccm 
cluster, sending partial commands to the cqlsh, and reading the completions 
suggested by the cqlsh. This is slow, because we have to use a timeout to wait 
for the cqlsh to accept our input and output its recommended completions.

In general, these don't really look like unit tests, they look more like 
dtests. One approach would be to remove this from the unit tests and make it 
part of the dtests. But I'd prefer to convert them to something more like a 
unit test. We can make them run faster by using cqlshlib internals directly, 
instead of running cqlsh in a subprocess. We can call {{cql_complete}} on each 
partial command and assert that the completions are what we expect.

Once I've rewritten the {{test_cqlsh_completion.py}} tests like this, it'll be 
up on the branch for consideration.

> Python 3 support for cqlsh
> --------------------------
>
>                 Key: CASSANDRA-10190
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10190
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Legacy/Tools
>            Reporter: Andrew Pennebaker
>            Assignee: Patrick Bannister
>            Priority: Normal
>              Labels: cqlsh
>             Fix For: 4.0, 4.0-alpha
>
>         Attachments: coverage_notes.txt
>
>
> Users who operate in a Python 3 environment may have trouble launching cqlsh. 
> Could we please update cqlsh's syntax to run in Python 3?
> As a workaround, users can setup pyenv, and cd to a directory with a 
> .python-version containing "2.7". But it would be nice if cqlsh supported 
> modern Python versions out of the box.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

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

Reply via email to