[
https://issues.apache.org/jira/browse/CASSANDRA-14298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16447389#comment-16447389
]
Patrick Bannister commented on CASSANDRA-14298:
-----------------------------------------------
I've considered a few approaches to salvaging the cqlsh copy tests that depend
on cassandra cqlshlib's CSV formatting functions. This mostly concerns the
function assertCsvResultEqual in
cqlsh_tests/cqlsh_copy_tests.py::TestCqlshCopy. There are 25 tests that use it
- they get a query result set, call COPY TO to export the results to CSV, call
cqlshlib's CSV formatting functions to format the same result set to CSV, and
assert that the two CSV files are equal. It's broken right now because cqlshlib
isn't compatible with Python 3.
The approach I'm following right now is to add a Python 2.7 compatible script
that can import cqlshlib and reuse most of the CSV formatting previously
implemented in the cqlsh copy tests. We'll run it with subprocess, pipe pickled
query results data to its stdin, and pipe CSV formatted data back out. The new
CSV formatting utility would run in a separate virtualenv. The biggest
disadvantage of this approach is that it adds Python 2.7 as an additional
native dependency.
If this is found to be unacceptable, I think the most realistic alternative
would be to rewrite the impacted tests to use different assertions. Most of the
impacted tests look like they're fundamentally about edge cases for data types
rather than CSV formatting.
> cqlshlib tests broken on b.a.o
> ------------------------------
>
> Key: CASSANDRA-14298
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14298
> Project: Cassandra
> Issue Type: Bug
> Components: Build, Testing
> Reporter: Stefan Podkowinski
> Assignee: Patrick Bannister
> Priority: Major
> Attachments: cqlsh_tests_notes.md
>
>
> It appears that cqlsh-tests on builds.apache.org on all branches stopped
> working since we removed nosetests from the system environment. See e.g.
> [here|https://builds.apache.org/view/A-D/view/Cassandra/job/Cassandra-trunk-cqlsh-tests/458/cython=no,jdk=JDK%201.8%20(latest),label=cassandra/console].
> Looks like we either have to make nosetests available again or migrate to
> pytest as we did with dtests. Giving pytest a quick try resulted in many
> errors locally, but I haven't inspected them in detail yet.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]