Comment 0 for bug 1218488

Revision history for this message
Terri Yu (terriyu) wrote :

When I run the Ceilometer test suite with the command "tox -e py27", I get 159 ConnectionFailure errors for the MongoDB tests.

The traceback for all of these errors is:

Traceback (most recent call last):
  File "/opt/stack/ceilometer/ceilometer/tests/base.py", line 71, in skip_if_not_implemented
    return func(*args, **kwargs)
  File "/opt/stack/ceilometer/tests/storage/test_storage_scenarios.py", line 1685, in setUp
    super(EventTestBase, self).setUp()
  File "/opt/stack/ceilometer/ceilometer/tests/db.py", line 43, in setUp
    self.conn = storage.get_connection(cfg.CONF)
  File "/opt/stack/ceilometer/ceilometer/storage/__init__.py", line 81, in get_connection
    return get_engine(conf).get_connection(conf)
  File "/opt/stack/ceilometer/ceilometer/storage/impl_mongodb.py", line 76, in get_connection
    return Connection(conf)
  File "/opt/stack/ceilometer/ceilometer/storage/impl_mongodb.py", line 301, in __init__
    self.conn = self.CONNECTION_POOL.connect(url)
  File "/opt/stack/ceilometer/ceilometer/storage/impl_mongodb.py", line 154, in connect
    safe=True)
  File "/opt/stack/ceilometer/.tox/py27/local/lib/python2.7/site-packages/pymongo/mongo_client.py", line 352, in __init__
    raise ConnectionFailure(str(e))
ConnectionFailure: connection closed

There is also an odd message "No module named deprecated" at the end of the test results.

If I increase the maximum number of MongoDB connections in the --maxConns argument to mongod in run-tests.sh, the errors go away, but I still get the "No module named deprecated" message.