Skip to content

Instantly share code, notes, and snippets.

@terriyu
Last active December 21, 2015 20:39
Show Gist options
  • Save terriyu/6363003 to your computer and use it in GitHub Desktop.
Save terriyu/6363003 to your computer and use it in GitHub Desktop.
The Ceilometer master branch from 23 Aug 2013 passes 588 storage tests without skipping any.
$ 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.a475.gef548b7.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=264)
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
++ mktemp -d /tmp/CEILO-MONGODB-XXXXX
+ MONGO_DATA=/tmp/CEILO-MONGODB-gzGLP
+ trap clean_exit EXIT
+ mkfifo /tmp/CEILO-MONGODB-gzGLP/out
+ MONGO_PID=12629
+ mongod --maxConns 32 --nojournal --noprealloc --smallfiles --quiet --noauth --port 29000 --dbpath /tmp/CEILO-MONGODB-gzGLP --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:48:36.655 [initandlisten] MongoDB starting : pid=12629 port=29000 dbpath=/tmp/CEILO-MONGODB-gzGLP 64-bit host=precise64'
+ grep -q 'waiting for connections on port'
+ read line
+ echo 'Tue Aug 27 04:48:36.656 [initandlisten] db version v2.4.5'
+ grep -q 'waiting for connections on port'
+ read line
+ grep -q 'waiting for connections on port'
+ echo 'Tue Aug 27 04:48:36.656 [initandlisten] git version: a2ddc68ba7c9cee17bfe69ed840383ec3506602b'
+ read line
+ grep -q 'waiting for connections on port'
+ echo 'Tue Aug 27 04:48:36.656 [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:48:36.656 [initandlisten] allocator: tcmalloc'
+ grep -q 'waiting for connections on port'
+ read line
+ echo 'Tue Aug 27 04:48:36.656 [initandlisten] options: { bind_ip: "localhost", dbpath: "/tmp/CEILO-MONGODB-gzGLP", maxConns: 32, 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:48:36.675 [FileAllocator] allocating new datafile /tmp/CEILO-MONGODB-gzGLP/local.ns, filling with zeroes...'
+ grep -q 'waiting for connections on port'
+ read line
+ echo 'Tue Aug 27 04:48:36.675 [FileAllocator] creating directory /tmp/CEILO-MONGODB-gzGLP/_tmp'
+ grep -q 'waiting for connections on port'
+ read line
+ grep -q 'waiting for connections on port'
+ echo 'Tue Aug 27 04:48:36.684 [FileAllocator] done allocating datafile /tmp/CEILO-MONGODB-gzGLP/local.ns, size: 16MB, took 0.001 secs'
+ read line
+ echo 'Tue Aug 27 04:48:36.684 [FileAllocator] allocating new datafile /tmp/CEILO-MONGODB-gzGLP/local.0, filling with zeroes...'
+ grep -q 'waiting for connections on port'
+ read line
+ echo 'Tue Aug 27 04:48:36.685 [FileAllocator] done allocating datafile /tmp/CEILO-MONGODB-gzGLP/local.0, size: 16MB, took 0 secs'
+ grep -q 'waiting for connections on port'
+ read line
+ echo 'Tue Aug 27 04:48:36.713 [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-gzGLP/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_f39378ee93f941f8900f66fed888e291, 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/tmp_quahH
running=${PYTHON:-python} -m subunit.run discover -t ./ ./tests --load-list /tmp/tmp6D1g1v
Ran 588 (+209) tests in 21.367s (-4.948s)
PASSED (id=259)
Slowest Tests
Test id Runtime (s)
------------------------------------------------------------------------------------------------ -----------
tests.storage.test_impl_sqlalchemy.AlarmTest.test_defaults 0.899
tests.storage.test_impl_sqlalchemy.AlarmTest.test_add 0.771
tests.storage.test_impl_mongodb.StatisticsTest.test_by_user_period_with_timezone 0.396
tests.storage.test_impl_sqlalchemy.RawSampleTest.test_clear_metering_data_no_data_to_remove 0.385
tests.storage.test_impl_sqlalchemy.StatisticsTest.test_by_user_period_with_timezone 0.374
tests.storage.test_impl_sqlalchemy.RawSampleTest.test_clear_metering_data 0.363
tests.storage.test_impl_mongodb.StatisticsGroupByTest.test_group_by_with_query_filter_and_period 0.331
tests.storage.test_impl_db2.ResourceTest.test_get_resources_by_source 0.330
tests.storage.test_impl_db2.MeterTest.test_get_meters_by_empty_metaquery 0.295
tests.storage.test_impl_mongodb.RawSampleTest.test_clear_metering_data_no_data_to_remove 0.292
+ clean_exit
+ local error_code=0
+ rm -rf /tmp/CEILO-MONGODB-gzGLP
+ '[' 12629 ']'
+ kill -9 12629
+ 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