[
https://issues.apache.org/jira/browse/CASSANDRA-14298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16468170#comment-16468170
]
Patrick Bannister commented on CASSANDRA-14298:
-----------------------------------------------
The encoding problem is environmental. Python subprocesses uses whatever is
returned by locale.getpreferredencoding(). We can do this on a Debian based
platform (such as Ubuntu) by setting LC_CTYPE='C.UTF-8'.
We could simply say that this environment setting is a prerequisite for the
cqlsh_tests, but I think we can do one better:
{code:java}
class TestCqlsh(Tester):
@classmethod
def setUpClass(cls):
cls._cached_driver_methods = monkeypatch_driver()
os.environ['LC_CTYPE'] = 'C.UTF-8' # override environment locale
setting to prefer UTF-8 encoding
@classmethod
def tearDownClass(cls):
unmonkeypatch_driver(cls._cached_driver_methods)
def setUp(self):
self.cluster.set_environment_variable('LC_CTYPE', 'C.UTF-8') # the
cluster is already configured, so we have to override its environment locale too
{code}
I have to admit I don't know what this will do on Windows, but I've tested it
on my Ubuntu environment and it works fine.
I'll issue a new patch with these additions. I'll also re-post the current
patch as the "old" patch, if you'd prefer to stick with it and just declare
that this environment variable setting is a prerequisite to running these tests.
> 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
> Labels: cqlsh, dtest
> Attachments: CASSANDRA-14298.txt, CASSANDRA-14298_old.txt,
> 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]