Skip to content

Instantly share code, notes, and snippets.

@terriyu
Last active December 21, 2015 20:39
Show Gist options
  • Save terriyu/6363001 to your computer and use it in GitHub Desktop.
Save terriyu/6363001 to your computer and use it in GitHub Desktop.
The Ceilometer master branch from 26 Aug 2013 skips 96 out of 758 storage tests.
$ cd /opt/stack/ceilometer
$ tox -e py27 -- storage
GLOB sdist-make: /opt/stack/ceilometer/setup.py
py27 inst-nodeps: /opt/stack/ceilometer/.tox/dist/ceilometer-2013.2.a487.gb4c9377.zip
py27 runtests: commands[0] | bash -x /opt/stack/ceilometer/run-tests.sh storage
WARNING:test command found but not installed in testenv
cmd: /bin/bash
env: /opt/stack/ceilometer/.tox/py27
Maybe forgot to specify a dependency?
+ set -e
+ '[' storage = --coverage ']'
+ '[' '!' '' ']'
+ bash tools/init_testr_if_needed.sh
+ python setup.py testr --slowest '--testr-args=--here=nova_tests storage'
running testr
running=${PYTHON:-python} -m subunit.run discover -t ./nova_tests ./nova_tests --list
PASSED (id=263)
Slowest Tests
Test id Runtime (s)
------------------------------------------------------------------------------------------------ -----------
tests.storage.test_impl_sqlalchemy.AlarmTest.test_defaults 0.736
tests.storage.test_impl_sqlalchemy.AlarmTest.test_add 0.711
tests.storage.test_impl_mongodb.StatisticsGroupByTest.test_group_by_with_query_filter_and_period 0.433
tests.storage.test_impl_mongodb.StatisticsGroupByTest.test_group_by_source 0.430
tests.storage.test_impl_mongodb.StatisticsTest.test_by_user_period_with_timezone 0.419
tests.storage.test_impl_mongodb.StatisticsGroupByTest.test_group_by_resource 0.395
tests.storage.test_impl_sqlalchemy.RawSampleTest.test_clear_metering_data_no_data_to_remove 0.395
tests.storage.test_impl_sqlalchemy.RawSampleTest.test_get_samples_in_default_order 0.383
tests.storage.test_impl_mongodb.StatisticsTest.test_by_user_period_start_end 0.376
tests.storage.test_impl_mongodb.StatisticsGroupByTest.test_group_by_project 0.371
++ mktemp -d /tmp/CEILO-MONGODB-XXXXX
+ MONGO_DATA=/tmp/CEILO-MONGODB-BSTtD
+ trap clean_exit EXIT
+ mkfifo /tmp/CEILO-MONGODB-BSTtD/out
+ MONGO_PID=12245
+ mongod --maxConns 128 --nojournal --noprealloc --smallfiles --quiet --noauth --port 29000 --dbpath /tmp/CEILO-MONGODB-BSTtD --bind_ip localhost
+ read line
+ grep -q 'waiting for connections on port'
+ echo 'note: noprealloc may hurt performance in many applications'
+ read line
+ echo 'Tue Aug 27 04:39:33.356 [initandlisten] MongoDB starting : pid=12245 port=29000 dbpath=/tmp/CEILO-MONGODB-BSTtD 64-bit host=precise64'
+ grep -q 'waiting for connections on port'
+ read line
+ grep -q 'waiting for connections on port'
+ echo 'Tue Aug 27 04:39:33.357 [initandlisten] db version v2.4.5'
+ read line
+ echo 'Tue Aug 27 04:39:33.357 [initandlisten] git version: a2ddc68ba7c9cee17bfe69ed840383ec3506602b'
+ read line
+ grep -q 'waiting for connections on port'
+ echo 'Tue Aug 27 04:39:33.357 [initandlisten] build info: Linux ip-10-2-29-40 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_49'
+ read line
+ echo 'Tue Aug 27 04:39:33.357 [initandlisten] allocator: tcmalloc'
+ grep -q 'waiting for connections on port'
+ read line
+ echo 'Tue Aug 27 04:39:33.357 [initandlisten] options: { bind_ip: "localhost", dbpath: "/tmp/CEILO-MONGODB-BSTtD", maxConns: 128, noauth: true, nojournal: true, noprealloc: true, port: 29000, quiet: true, smallfiles: true }'
+ grep -q 'waiting for connections on port'
+ read line
+ echo 'Tue Aug 27 04:39:33.383 [FileAllocator] allocating new datafile /tmp/CEILO-MONGODB-BSTtD/local.ns, filling with zeroes...'
+ grep -q 'waiting for connections on port'
+ read line
+ echo 'Tue Aug 27 04:39:33.383 [FileAllocator] creating directory /tmp/CEILO-MONGODB-BSTtD/_tmp'
+ grep -q 'waiting for connections on port'
+ read line
+ echo 'Tue Aug 27 04:39:33.418 [FileAllocator] done allocating datafile /tmp/CEILO-MONGODB-BSTtD/local.ns, size: 16MB, took 0.011 secs'
+ grep -q 'waiting for connections on port'
+ read line
+ echo 'Tue Aug 27 04:39:33.418 [FileAllocator] allocating new datafile /tmp/CEILO-MONGODB-BSTtD/local.0, filling with zeroes...'
+ grep -q 'waiting for connections on port'
+ read line
+ echo 'Tue Aug 27 04:39:33.428 [FileAllocator] done allocating datafile /tmp/CEILO-MONGODB-BSTtD/local.0, size: 16MB, took 0.009 secs'
+ grep -q 'waiting for connections on port'
+ read line
+ echo 'Tue Aug 27 04:39:33.460 [initandlisten] waiting for connections on port 29000'
+ grep -q 'waiting for connections on port'
+ break
+ export CEILOMETER_TEST_MONGODB_URL=mongodb://localhost:29000/ceilometer
+ CEILOMETER_TEST_MONGODB_URL=mongodb://localhost:29000/ceilometer
+ python setup.py testr --slowest --testr-args=storage
+ cat /tmp/CEILO-MONGODB-BSTtD/out
running testr
/opt/stack/ceilometer/.tox/py27/local/lib/python2.7/site-packages/pymongo/mongo_client.py:343: UserWarning: database name or authSource in URI is being ignored. If you wish to authenticate to ceilometer_184ecc67200846768b700fe7485e48bf, you must provide a username and password.
"must provide a username and password." % (db_name,))
/opt/stack/ceilometer/.tox/py27/local/lib/python2.7/site-packages/alembic/util.py:163: UserWarning: Skipping unsupported ALTER for creation of implicit constraint
warnings.warn(msg)
/opt/stack/ceilometer/.tox/py27/local/lib/python2.7/site-packages/alembic/util.py:163: UserWarning: Skipping unsupported ALTER for creation of implicit constraint
warnings.warn(msg)
running=${PYTHON:-python} -m subunit.run discover -t ./ ./tests --list
running=${PYTHON:-python} -m subunit.run discover -t ./ ./tests --load-list /tmp/tmpjJJgFj
running=${PYTHON:-python} -m subunit.run discover -t ./ ./tests --load-list /tmp/tmpG7z1wz
Ran 758 (+464) tests in 26.354s (+2.898s)
PASSED (id=258, skips=96)
Slowest Tests
Test id Runtime (s)
--------------------------------------------------------------------------------------------------------- -----------
tests.storage.test_storage_scenarios.RawSampleTest.test_clear_metering_data_no_data_to_remove(sqlalchemy) 0.661
tests.storage.test_impl_sqlalchemy.EventTest.test_datetime_traits 0.640
tests.storage.test_impl_sqlalchemy.EventTest.test_float_traits 0.535
tests.storage.test_storage_scenarios.StatisticsTest.test_by_user_period_with_timezone(sqlalchemy) 0.374
tests.storage.test_storage_scenarios.StatisticsTest.test_by_user_period_with_timezone(mongodb) 0.370
tests.storage.test_storage_scenarios.ResourceTest.test_get_resources_start_timestamp(sqlalchemy) 0.340
tests.storage.test_storage_scenarios.ResourceTest.test_get_resources_end_timestamp(sqlalchemy) 0.336
tests.storage.test_storage_scenarios.MeterTestPagination.test_get_meters_paginate(db2) 0.327
tests.storage.test_storage_scenarios.RawSampleTest.test_get_samples_by_metaquery(sqlalchemy) 0.313
tests.storage.test_storage_scenarios.RawSampleTest.test_get_samples_by_name2(sqlalchemy) 0.304
+ clean_exit
+ local error_code=0
+ rm -rf /tmp/CEILO-MONGODB-BSTtD
+ '[' 12245 ']'
+ kill -9 12245
+ return 0
py27 runtests: commands[1] | /opt/stack/ceilometer/tools/config/check_uptodate.sh
___________________________________ summary ____________________________________
py27: commands succeeded
congratulations :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment