Are you running on a platform that doesn't care about capitalization?

The next error I get:

$ nosetests
E
======================================================================
ERROR: Failure: ImportError (No module named Constants)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/usr/local/python/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/loader.py",
line 379, in loadTestsFromName
    addr.filename, addr.module)
  File 
"/usr/local/python/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/importer.py",
line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File 
"/usr/local/python/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/importer.py",
line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/k/jack/cassandra/test/system/test_server.py", line 26, in <module>
    from Constants import VERSION
ImportError: No module named Constants

----------------------------------------------------------------------
Ran 1 test in 0.054s

FAILED (errors=1)

This is caused by the capitalization of "Constants" -- change to
"constants" to fix.

test/system/test_server.py, line 22

from constants import VERSION

Now it gets a bit further and a few tests pass. The next error is:

$ nosetests
......EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
======================================================================
ERROR: 
system.test_server.TestMutations.test_batch_mutate_does_not_yet_accept_slice_ranges
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/usr/local/python/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/case.py",
line 183, in runTest
    self.test(*self.arg)
  File "/k/jack/cassandra/test/system/test_server.py", line 480, in
test_batch_mutate_does_not_yet_accept_slice_ranges
    _expect_exception(send_range, InvalidRequestException)
  File "/k/jack/cassandra/test/system/test_server.py", line 165, in
_expect_exception
    r = fn()
  File "/k/jack/cassandra/test/system/test_server.py", line 479, in send_range
    ConsistencyLevel.ONE)
  File "/k/jack/cassandra/interface/thrift/gen-py/cassandra/Cassandra.py",
line 692, in batch_mutate
    self.recv_batch_mutate()
  File "/k/jack/cassandra/interface/thrift/gen-py/cassandra/Cassandra.py",
line 705, in recv_batch_mutate
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  File "build/bdist.linux-i686/egg/thrift/protocol/TBinaryProtocol.py",
line 126, in readMessageBegin
    sz = self.readI32()
  File "build/bdist.linux-i686/egg/thrift/protocol/TBinaryProtocol.py",
line 203, in readI32
    buff = self.trans.readAll(4)
  File "build/bdist.linux-i686/egg/thrift/transport/TTransport.py",
line 58, in readAll
    chunk = self.read(sz-have)
  File "build/bdist.linux-i686/egg/thrift/transport/TTransport.py",
line 155, in read
    self.__rbuf = StringIO(self.__trans.read(max(sz, self.DEFAULT_BUFFER)))
  File "build/bdist.linux-i686/egg/thrift/transport/TSocket.py", line
92, in read
    buff = self.handle.recv(sz)
error: [Errno 104] Connection reset by peer

Can you help with that one? (Subsequently everything fails with
"Unclean shutdown detected" b/c the test server is left running.)

> It's not as easy as that -- like most tests, the system tests are
> independent and need to start with a clean environment. nose has to be
> able to restart the servers in between each, and clean out the data &
> commitlog directories.

What if I create a separate set of tests to make sure a running
cluster is behaving properly? The first test would make sure the
proper key spaces exist. That could fail with a clear message.
Subsequently, scan the keys, remove all of them, then scan again. Now,
either the environment is clean or something failed. Next, do some
insertions, deletions, scans, etc. This would help me verify that my
cluster is set up properly.

Jack

On Mon, Feb 8, 2010 at 5:32 AM, Jonathan Ellis <jbel...@gmail.com> wrote:
> On Mon, Feb 8, 2010 at 3:17 AM, Jack Culpepper <jackculpep...@gmail.com> 
> wrote:
>> Ok. Fixed that, but then run nosetests and I get a bunch of other
>> errors.. I must be doing something wrong. I just checked out the code
>> like 20 mins ago.
>
> I'm going to have to agree with your diagnosis -- everything passes
> for me -- but it's hard to help w/o an example of the errors. :)
>
>> Also, I see that the tests are run on a single node rather than a
>> multi-node setup. I would be nice if the testing infrastructure
>> connected to a running cluster, and the standard storage-conf.xml
>> included the column families necessary for testing. We could do that
>> by including the test keyspaces in
>>
>> test/conf/storage-conf.xml
>>
>> as a part of the default storage-conf.xml that gets installed with the
>> system. Best,
>
> It's not as easy as that -- like most tests, the system tests are
> independent and need to start with a clean environment. nose has to be
> able to restart the servers in between each, and clean out the data &
> commitlog directories.
>
> -Jonathan
>

Reply via email to