cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-3920) tests for cqlsh
Date Mon, 01 Oct 2012 23:37:09 GMT

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

Aleksey Yeschenko commented on CASSANDRA-3920:
----------------------------------------------

I want to apply there changes by Paul before merging 4488. I've fixed some (minor) things
but I'm still getting FAILED (errors=3, failures=1) when running the suite:

======================================================================
FAIL: test_timestamp_output (cqlshlib.test.test_cqlsh_output.TestCqlshOutput)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/test/test_cqlsh_output.py", line
444, in test_timestamp_output
    ), env={'TZ': 'EST'})
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/test/test_cqlsh_output.py", line
99, in assertQueriesGiveColoredOutput
    self.assertEqual(outputline.plain().rstrip(), plain)
AssertionError: ' 2012-05-14 07:53:20+0000' != ' 2012-05-14 07:53:20-0500'

(this one is caused by Ubuntu's strftime not supporting %z, or Ubuntu's python not supporting
%z. the same test passes on Max OS X. I'll open a separate issue later. Doesn't need addressing
here.)

======================================================================
ERROR: test_exit_prints_no_newline (cqlshlib.test.test_cqlsh_output.TestCqlshOutput)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/test/test_cqlsh_output.py", line
929, in test_exit_prints_no_newline
    self.assertRaises(EOFError, c.read_lines, 1)
  File "/usr/lib/python2.7/unittest/case.py", line 471, in assertRaises
    callableObj(*args, **kwargs)
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/test/run_cqlsh.py", line 185,
in read_lines
    lines.append(self.read_until('\n', blksize=blksize))
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/test/run_cqlsh.py", line 170,
in read_until
    val = self.read(blksize)
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/test/run_cqlsh.py", line 158,
in read_tty
    return os.read(self.childpty, blksize)
OSError: [Errno 5] Input/output error

(I won't be surprised if this is another Ubuntu vs. Max OS X difference and this os.read call
throws EOFError on Mac OS X but OSError on Ubuntu. Can you please run it again?)

======================================================================
ERROR: test_eof_prints_newline (cqlshlib.test.test_cqlsh_output.TestCqlshOutput)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/test/test_cqlsh_output.py", line
920, in test_eof_prints_newline
    self.assertRaises(EOFError, c.read_lines, 1)
  File "/usr/lib/python2.7/unittest/case.py", line 471, in assertRaises
    callableObj(*args, **kwargs)
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/test/run_cqlsh.py", line 185,
in read_lines
    lines.append(self.read_until('\n', blksize=blksize))
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/test/run_cqlsh.py", line 170,
in read_until
    val = self.read(blksize)
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/test/run_cqlsh.py", line 158,
in read_tty
    return os.read(self.childpty, blksize)
OSError: [Errno 5] Input/output error

(same as above)

======================================================================
ERROR: test_describe_keyspace_output (cqlshlib.test.test_cqlsh_output.TestCqlshOutput)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/test/test_cqlsh_output.py", line
717, in test_describe_keyspace_output
    self.check_describe_keyspace(v)
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/test/test_cqlsh_output.py", line
680, in check_describe_keyspace
    statements = split_cql_commands(copy_desc, cqlver=fullcqlver)
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/test/cassconnect.py", line 61,
in split_cql_commands
    statements, in_batch = ruleset.cql_split_statements(source)
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/cqlhandling.py", line 170, in
cql_split_statements
    tokens = self.lex(text)
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/pylexotron.py", line 428, in
lex
    raise LexingError.from_text(text, unmatched, 'text could not be lexed')
  File "/home/aleksey/Work/DataStax/cassandra/pylib/cqlshlib/pylexotron.py", line 27, in from_text
    raise cls(linenum, charnum, msg)
LexingError: text could not be lexed at line 20, char 1

(this one is caused by "/home/aleksey/Work/DataStax/cassandra/bin/../pylib/cqlshlib/cql3handling.py:866:
UnexpectedTableStructure: Unexpected table structure; may not translate correctly to CQL.
Compact storage CF dynamic_columns has no column aliases, but comparator is not UTF8Type."
line in DESCRIBE KEYSPACE output.)

Please let me know if you can look at these failing tests or if I should deal with the rest
myself. Thanks.


                
> tests for cqlsh
> ---------------
>
>                 Key: CASSANDRA-3920
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3920
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>            Reporter: paul cannon
>            Assignee: paul cannon
>            Priority: Minor
>              Labels: cqlsh
>
> Cqlsh has become big enough and tries to cover enough situations that it's time to start
acting like a responsible adult and make this bugger some unit tests to guard against regressions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message