[
https://issues.apache.org/jira/browse/CASSANDRA-11895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15388365#comment-15388365
]
Michael Shuler commented on CASSANDRA-11895:
--------------------------------------------
I added this to {{dtest.py}} and it still failed on 2.1:
{noformat}
(11895-cqlsh-utf8)mshuler@hana:~/git/cassandra-dtest$ git diff master
diff --git a/dtest.py b/dtest.py
index b8a339e..47f968b 100644
--- a/dtest.py
+++ b/dtest.py
@@ -90,6 +90,10 @@ if os.environ.get('DISABLE_VNODES', '').lower() in ('yes',
'true'):
CURRENT_TEST = ""
+# set default encoding for all tests - CASSANDRA-11895
+reload(sys)
+sys.setdefaultencoding('utf-8')
+
logging.basicConfig(filename=os.path.join(LOG_SAVED_DIR, "dtest.log"),
filemode='w',
format='%(asctime)s,%(msecs)d %(name)s %(current_test)s
%(levelname)s %(message)s',
{noformat}
This test passes on 2.2+ for me without the above, so I'm not sure what's
different about 2.1 that throws this error, regardless of what we've tried so
far:
{noformat}
test_unicode_invalid_request_error (cqlsh_tests.cqlsh_tests.TestCqlsh) ... FAIL
======================================================================
FAIL: test_unicode_invalid_request_error (cqlsh_tests.cqlsh_tests.TestCqlsh)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/automaton/cassandra-dtest/cqlsh_tests/cqlsh_tests.py", line 483,
in test_unicode_invalid_request_error
self.assertIn(u'"รค" is not a valid keyspace name', err)
AssertionError: u'"\xe4" is not a valid keyspace name' not found in
u"<stdin>:2:'ascii' codec can't encode character u'\\xe4' in position 36:
ordinal not in range(128)\n"
-------------------- >> begin captured logging << --------------------
dtest: DEBUG: cluster ccm directory: /tmp/dtest-xcod69
dtest: DEBUG: Done setting configuration options:
{ 'initial_token': None,
'num_tokens': '32',
'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 << ---------------------
----------------------------------------------------------------------
Ran 1 test in 7.761s
{noformat}
> dtest failure in
> cqlsh_tests.cqlsh_tests.TestCqlsh.test_unicode_invalid_request_error
> -------------------------------------------------------------------------------------
>
> Key: CASSANDRA-11895
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11895
> Project: Cassandra
> Issue Type: Test
> Reporter: Sean McCarthy
> Assignee: Michael Shuler
> Labels: dtest
> Attachments: node1.log
>
>
> example failure:
> http://cassci.datastax.com/job/cassandra-2.1_dtest/470/testReport/cqlsh_tests.cqlsh_tests/TestCqlsh/test_unicode_invalid_request_error
> Failed on CassCI build cassandra-2.1_dtest #470
> This is after the fix for CASSANDRA-11799.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)