You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Mark Dewey <mi...@gmail.com> on 2012/04/14 20:34:18 UTC

nosetests

I thought I followed the instructions to set up the nose tests, but when I
run them all they do is (slowly) print out ".E" and then hang. Any clues?

Mark

Re: nosetests

Posted by Jonathan Ellis <jb...@gmail.com>.
nosetests manages starting and tearing down its own local Cassandra
instance; if you start one manually it will likely conflict.

On Sat, Apr 14, 2012 at 1:44 PM, aaron morton <aa...@thelastpickle.com> wrote:
> Looks like it's hanging while talking to the cluster. Ensure cassandra is running and on default ports.
>
> I also run nosetests with -vdx for verbose, detailed errors and stop of first fail (http://readthedocs.org/docs/nose/en/latest/usage.html#extended-usage)
>
> Cheers
>
>
> -----------------
> Aaron Morton
> Freelance Developer
> @aaronmorton
> http://www.thelastpickle.com
>
> On 15/04/2012, at 6:35 AM, Mark Dewey wrote:
>
>> PS I got the following trace when I aborted.
>>
>> Traceback (most recent call last):
>>  File "/usr/bin/nosetests", line 9, in <module>
>>    load_entry_point('nose==0.11.4', 'console_scripts', 'nosetests')()
>>  File "/usr/lib/pymodules/python2.7/nose/core.py", line 117, in __init__
>>    **extra_args)
>>  File "/usr/lib/python2.7/unittest/main.py", line 95, in __init__
>>    self.runTests()
>>  File "/usr/lib/pymodules/python2.7/nose/core.py", line 196, in runTests
>>    result = self.testRunner.run(self.test)
>>  File "/usr/lib/pymodules/python2.7/nose/core.py", line 61, in run
>>    test(result)
>>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 176, in __call__
>>    return self.run(*arg, **kw)
>>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 223, in run
>>    test(orig)
>>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 176, in __call__
>>    return self.run(*arg, **kw)
>>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 223, in run
>>    test(orig)
>>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 176, in __call__
>>    return self.run(*arg, **kw)
>>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 223, in run
>>    test(orig)
>>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 176, in __call__
>>    return self.run(*arg, **kw)
>>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 223, in run
>>    test(orig)
>>  File "/usr/lib/pymodules/python2.7/nose/case.py", line 44, in __call__
>>    return self.run(*arg, **kwarg)
>>  File "/usr/lib/pymodules/python2.7/nose/case.py", line 132, in run
>>    self.runTest(result)
>>  File "/usr/lib/pymodules/python2.7/nose/case.py", line 150, in runTest
>>    test(result)
>>  File "/usr/lib/python2.7/unittest/case.py", line 385, in __call__
>>    return self.run(*args, **kwds)
>>  File "/usr/lib/python2.7/unittest/case.py", line 312, in run
>>    self.setUp()
>>  File "/usr/lib/pymodules/python2.7/nose/case.py", line 367, in setUp
>>    try_run(self.inst, ('setup', 'setUp'))
>>  File "/usr/lib/pymodules/python2.7/nose/util.py", line 491, in try_run
>>    return func()
>>  File "/home/mildewey/Projects/cassandra/test/system/__init__.py", line
>> 113, in setUp
>>    self.define_schema()
>>  File "/home/mildewey/Projects/cassandra/test/system/__init__.py", line
>> 180, in define_schema
>>    self.client.system_add_keyspace(ks)
>>  File
>> "/home/mildewey/Projects/cassandra/interface/thrift/gen-py/cassandra/Cassandra.py",
>> line 1440, in system_add_keyspace
>>    return self.recv_system_add_keyspace()
>>  File
>> "/home/mildewey/Projects/cassandra/interface/thrift/gen-py/cassandra/Cassandra.py",
>> line 1451, in recv_system_add_keyspace
>>    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
>>  File
>> "/usr/local/lib/python2.7/dist-packages/thrift/protocol/TBinaryProtocol.py",
>> line 137, in readMessageBegin
>>    name = self.trans.readAll(sz)
>>  File
>> "/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py",
>> line 58, in readAll
>>    chunk = self.read(sz-have)
>>  File
>> "/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py",
>> line 272, in read
>>    self.readFrame()
>>  File
>> "/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py",
>> line 276, in readFrame
>>    buff = self.__trans.readAll(4)
>>  File
>> "/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py",
>> line 58, in readAll
>>    chunk = self.read(sz-have)
>>  File
>> "/usr/local/lib/python2.7/dist-packages/thrift/transport/TSocket.py", line
>> 94, in read
>>    buff = self.handle.recv(sz)
>>
>>
>> On Sat, Apr 14, 2012 at 1:34 PM, Mark Dewey <mi...@gmail.com> wrote:
>>
>>> I thought I followed the instructions to set up the nose tests, but when I
>>> run them all they do is (slowly) print out ".E" and then hang. Any clues?
>>>
>>> Mark
>>>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Re: nosetests

Posted by aaron morton <aa...@thelastpickle.com>.
Looks like it's hanging while talking to the cluster. Ensure cassandra is running and on default ports. 

I also run nosetests with -vdx for verbose, detailed errors and stop of first fail (http://readthedocs.org/docs/nose/en/latest/usage.html#extended-usage)

Cheers


-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com

On 15/04/2012, at 6:35 AM, Mark Dewey wrote:

> PS I got the following trace when I aborted.
> 
> Traceback (most recent call last):
>  File "/usr/bin/nosetests", line 9, in <module>
>    load_entry_point('nose==0.11.4', 'console_scripts', 'nosetests')()
>  File "/usr/lib/pymodules/python2.7/nose/core.py", line 117, in __init__
>    **extra_args)
>  File "/usr/lib/python2.7/unittest/main.py", line 95, in __init__
>    self.runTests()
>  File "/usr/lib/pymodules/python2.7/nose/core.py", line 196, in runTests
>    result = self.testRunner.run(self.test)
>  File "/usr/lib/pymodules/python2.7/nose/core.py", line 61, in run
>    test(result)
>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 176, in __call__
>    return self.run(*arg, **kw)
>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 223, in run
>    test(orig)
>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 176, in __call__
>    return self.run(*arg, **kw)
>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 223, in run
>    test(orig)
>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 176, in __call__
>    return self.run(*arg, **kw)
>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 223, in run
>    test(orig)
>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 176, in __call__
>    return self.run(*arg, **kw)
>  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 223, in run
>    test(orig)
>  File "/usr/lib/pymodules/python2.7/nose/case.py", line 44, in __call__
>    return self.run(*arg, **kwarg)
>  File "/usr/lib/pymodules/python2.7/nose/case.py", line 132, in run
>    self.runTest(result)
>  File "/usr/lib/pymodules/python2.7/nose/case.py", line 150, in runTest
>    test(result)
>  File "/usr/lib/python2.7/unittest/case.py", line 385, in __call__
>    return self.run(*args, **kwds)
>  File "/usr/lib/python2.7/unittest/case.py", line 312, in run
>    self.setUp()
>  File "/usr/lib/pymodules/python2.7/nose/case.py", line 367, in setUp
>    try_run(self.inst, ('setup', 'setUp'))
>  File "/usr/lib/pymodules/python2.7/nose/util.py", line 491, in try_run
>    return func()
>  File "/home/mildewey/Projects/cassandra/test/system/__init__.py", line
> 113, in setUp
>    self.define_schema()
>  File "/home/mildewey/Projects/cassandra/test/system/__init__.py", line
> 180, in define_schema
>    self.client.system_add_keyspace(ks)
>  File
> "/home/mildewey/Projects/cassandra/interface/thrift/gen-py/cassandra/Cassandra.py",
> line 1440, in system_add_keyspace
>    return self.recv_system_add_keyspace()
>  File
> "/home/mildewey/Projects/cassandra/interface/thrift/gen-py/cassandra/Cassandra.py",
> line 1451, in recv_system_add_keyspace
>    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
>  File
> "/usr/local/lib/python2.7/dist-packages/thrift/protocol/TBinaryProtocol.py",
> line 137, in readMessageBegin
>    name = self.trans.readAll(sz)
>  File
> "/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py",
> line 58, in readAll
>    chunk = self.read(sz-have)
>  File
> "/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py",
> line 272, in read
>    self.readFrame()
>  File
> "/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py",
> line 276, in readFrame
>    buff = self.__trans.readAll(4)
>  File
> "/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py",
> line 58, in readAll
>    chunk = self.read(sz-have)
>  File
> "/usr/local/lib/python2.7/dist-packages/thrift/transport/TSocket.py", line
> 94, in read
>    buff = self.handle.recv(sz)
> 
> 
> On Sat, Apr 14, 2012 at 1:34 PM, Mark Dewey <mi...@gmail.com> wrote:
> 
>> I thought I followed the instructions to set up the nose tests, but when I
>> run them all they do is (slowly) print out ".E" and then hang. Any clues?
>> 
>> Mark
>> 


Re: nosetests

Posted by Mark Dewey <mi...@gmail.com>.
PS I got the following trace when I aborted.

Traceback (most recent call last):
  File "/usr/bin/nosetests", line 9, in <module>
    load_entry_point('nose==0.11.4', 'console_scripts', 'nosetests')()
  File "/usr/lib/pymodules/python2.7/nose/core.py", line 117, in __init__
    **extra_args)
  File "/usr/lib/python2.7/unittest/main.py", line 95, in __init__
    self.runTests()
  File "/usr/lib/pymodules/python2.7/nose/core.py", line 196, in runTests
    result = self.testRunner.run(self.test)
  File "/usr/lib/pymodules/python2.7/nose/core.py", line 61, in run
    test(result)
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 176, in __call__
    return self.run(*arg, **kw)
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 223, in run
    test(orig)
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 176, in __call__
    return self.run(*arg, **kw)
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 223, in run
    test(orig)
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 176, in __call__
    return self.run(*arg, **kw)
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 223, in run
    test(orig)
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 176, in __call__
    return self.run(*arg, **kw)
  File "/usr/lib/pymodules/python2.7/nose/suite.py", line 223, in run
    test(orig)
  File "/usr/lib/pymodules/python2.7/nose/case.py", line 44, in __call__
    return self.run(*arg, **kwarg)
  File "/usr/lib/pymodules/python2.7/nose/case.py", line 132, in run
    self.runTest(result)
  File "/usr/lib/pymodules/python2.7/nose/case.py", line 150, in runTest
    test(result)
  File "/usr/lib/python2.7/unittest/case.py", line 385, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python2.7/unittest/case.py", line 312, in run
    self.setUp()
  File "/usr/lib/pymodules/python2.7/nose/case.py", line 367, in setUp
    try_run(self.inst, ('setup', 'setUp'))
  File "/usr/lib/pymodules/python2.7/nose/util.py", line 491, in try_run
    return func()
  File "/home/mildewey/Projects/cassandra/test/system/__init__.py", line
113, in setUp
    self.define_schema()
  File "/home/mildewey/Projects/cassandra/test/system/__init__.py", line
180, in define_schema
    self.client.system_add_keyspace(ks)
  File
"/home/mildewey/Projects/cassandra/interface/thrift/gen-py/cassandra/Cassandra.py",
line 1440, in system_add_keyspace
    return self.recv_system_add_keyspace()
  File
"/home/mildewey/Projects/cassandra/interface/thrift/gen-py/cassandra/Cassandra.py",
line 1451, in recv_system_add_keyspace
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  File
"/usr/local/lib/python2.7/dist-packages/thrift/protocol/TBinaryProtocol.py",
line 137, in readMessageBegin
    name = self.trans.readAll(sz)
  File
"/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py",
line 58, in readAll
    chunk = self.read(sz-have)
  File
"/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py",
line 272, in read
    self.readFrame()
  File
"/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py",
line 276, in readFrame
    buff = self.__trans.readAll(4)
  File
"/usr/local/lib/python2.7/dist-packages/thrift/transport/TTransport.py",
line 58, in readAll
    chunk = self.read(sz-have)
  File
"/usr/local/lib/python2.7/dist-packages/thrift/transport/TSocket.py", line
94, in read
    buff = self.handle.recv(sz)


On Sat, Apr 14, 2012 at 1:34 PM, Mark Dewey <mi...@gmail.com> wrote:

> I thought I followed the instructions to set up the nose tests, but when I
> run them all they do is (slowly) print out ".E" and then hang. Any clues?
>
> Mark
>

Re: nosetests

Posted by Pavel Yaskevich <po...@gmail.com>.
That happens sometimes when tests fail unexpectedly, you can delete /home/mildewey/Projects/cassandra/system_test.pid and start nosetests again.

On Sunday 15 April 2012 at 01:35, Mark Dewey wrote:

> With the =ve I got 92 copies of this (one for each test):
> 
> ======================================================================
> ERROR: system.test_thrift_server.TestTruncate.test_truncate
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/usr/lib/pymodules/python2.7/nose/case.py", line 367, in setUp
> try_run(self.inst, ('setup', 'setUp'))
> File "/usr/lib/pymodules/python2.7/nose/util.py", line 491, in try_run
> return func()
> File "/home/mildewey/Projects/cassandra/test/system/__init__.py", line
> 68, in setUp
> sys.exit()
> SystemExit:
> -------------------- >> begin captured stdout << ---------------------
> Unclean shutdown detected,
> (/home/mildewey/Projects/cassandra/system_test.pid found)
> 
> --------------------- >> end captured stdout << ----------------------
> 
> 
> On Sat, Apr 14, 2012 at 2:33 PM, Brandon Williams <driftx@gmail.com (mailto:driftx@gmail.com)> wrote:
> 
> > Try nosetests -ve to see which one is failing and exit on the first error.
> > On Apr 14, 2012 1:34 PM, "Mark Dewey" <mildewey@gmail.com (mailto:mildewey@gmail.com)> wrote:
> > 
> > > I thought I followed the instructions to set up the nose tests, but when I
> > > run them all they do is (slowly) print out ".E" and then hang. Any clues?
> > > 
> > > Mark 


Re: nosetests

Posted by Mark Dewey <mi...@gmail.com>.
With the =ve I got 92 copies of this (one for each test):

======================================================================
ERROR: system.test_thrift_server.TestTruncate.test_truncate
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/nose/case.py", line 367, in setUp
    try_run(self.inst, ('setup', 'setUp'))
  File "/usr/lib/pymodules/python2.7/nose/util.py", line 491, in try_run
    return func()
  File "/home/mildewey/Projects/cassandra/test/system/__init__.py", line
68, in setUp
    sys.exit()
SystemExit:
-------------------- >> begin captured stdout << ---------------------
Unclean shutdown detected,
(/home/mildewey/Projects/cassandra/system_test.pid found)

--------------------- >> end captured stdout << ----------------------


On Sat, Apr 14, 2012 at 2:33 PM, Brandon Williams <dr...@gmail.com> wrote:

> Try nosetests -ve to see which one is failing and exit on the first error.
> On Apr 14, 2012 1:34 PM, "Mark Dewey" <mi...@gmail.com> wrote:
>
>> I thought I followed the instructions to set up the nose tests, but when I
>> run them all they do is (slowly) print out ".E" and then hang. Any clues?
>>
>> Mark
>>
>

Re: nosetests

Posted by Brandon Williams <dr...@gmail.com>.
Try nosetests -ve to see which one is failing and exit on the first error.
On Apr 14, 2012 1:34 PM, "Mark Dewey" <mi...@gmail.com> wrote:

> I thought I followed the instructions to set up the nose tests, but when I
> run them all they do is (slowly) print out ".E" and then hang. Any clues?
>
> Mark
>