← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1206526] Re: Timing issue in SimpleTenantUsageSample(Json|XML)Test

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => havana-3

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1206526

Title:
  Timing issue in SimpleTenantUsageSample(Json|XML)Test

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  Being an integrated test SimpleTenantUsageSample(Json|XML)Test makes
  POST/GET HTTP queries to start a new instance and retrieve information
  about it. The actual implementation is stubbed out, but queries
  nevertheless take some time to proceed.

  Test setUp() is defined as:

      def setUp(self):
          """setUp method for simple tenant usage."""
          super(SimpleTenantUsageSampleJsonTest, self).setUp()
          self._post_server()
          timeutils.set_time_override(timeutils.utcnow() +
                                      datetime.timedelta(hours=1))
          self.query = {
              'start': str(timeutils.utcnow() - datetime.timedelta(hours=1)),
              'end': str(timeutils.utcnow())
          }

  The problem is, that if for some reason (e. g. high LA value)
  self._post_server() takes more than 1 second, the test will fail,
  because the instance uptime value will not be equal to one defined in
  API call sample (3600):

  Traceback (most recent call last):
    File "/home/jenkins/workspace/gate-nova-python26/nova/tests/integrated/test_api_samples.py", line 2132, in test_get_tenant_usage_details
      response, 200)
    File "/home/jenkins/workspace/gate-nova-python26/nova/tests/integrated/test_api_samples.py", line 307, in _verify_response
      response_data, "Response")
    File "/home/jenkins/workspace/gate-nova-python26/nova/tests/integrated/test_api_samples.py", line 205, in _compare_result
      result_str)
    File "/home/jenkins/workspace/gate-nova-python26/nova/tests/integrated/test_api_samples.py", line 238, in _compare_result
      raise NoMatch('\n'.join(error))
  NoMatch: Extra list items in template:
  { ... {'__tag__': 'uptime', '__content__': '3600'}]}]}
  Extra list items in Response:
  { ... {'__tag__': 'uptime', '__content__': '3601'}]}]}

  The error is rare, nevertheless it happens time to time when Jenkins
  runs gate jobs.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1206526/+subscriptions