Fix influxdb test that fails intermittently

This commit is contained in:
Ryan Mclean 2016-12-12 15:21:52 -05:00
parent 40e50a337f
commit e470d5ca53
3 changed files with 9 additions and 3 deletions

View file

@ -3,6 +3,10 @@
Release History
===============
`3.0.2`_ (12-Dec-2016)
----------------------
- Fix influxdb test that fails intermittently.
`3.0.1`_ (12-Dec-2016)
----------------------
- Add README.rst to MANIFEST.in
@ -59,7 +63,8 @@ Release History
- Add :class:`sprockets.mixins.metrics.InfluxDBMixin`
- Add :class:`sprockets.mixins.metrics.influxdb.InfluxDBConnection`
.. _Next Release: https://github.com/sprockets/sprockets.mixins.metrics/compare/3.0.1...master
.. _Next Release: https://github.com/sprockets/sprockets.mixins.metrics/compare/3.0.2...master
.. _3.0.2: https://github.com/sprockets/sprockets.mixins.metrics/compare/3.0.1...3.0.2
.. _3.0.1: https://github.com/sprockets/sprockets.mixins.metrics/compare/3.0.0...3.0.1
.. _3.0.0: https://github.com/sprockets/sprockets.mixins.metrics/compare/2.1.1...3.0.0
.. _2.1.1: https://github.com/sprockets/sprockets.mixins.metrics/compare/2.1.0...2.1.1

View file

@ -1,3 +1,3 @@
version_info = (3, 0, 1)
version_info = (3, 0, 2)
__version__ = '.'.join(str(v) for v in version_info)
__all__ = ['__version__', 'version_info']

View file

@ -206,7 +206,8 @@ class InfluxDbTests(testing.AsyncHTTPTestCase):
self.assertEqual(tag_dict['status_code'], '204')
value_dict = dict(a.split('=') for a in fields.split(','))
assert_between(0.25, float(value_dict['duration']), 0.3)
self.assertIn('duration', value_dict)
self.assertTrue(float(value_dict['duration']) > 0)
nanos_since_epoch = int(timestamp)
then = nanos_since_epoch / 1000000000