← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1278550] [NEW] test_provider_token_expiration_validation tests fails on slow system

 

Public bug reported:


The keystone.tests.test_token_provider.TestTokenProvider.test_provider_token_expiration_validation test fails on a system where it takes a long time to run the tests. The problem is that the test is expecting the token to be valid, but with the long run time and the shorter default token expiration time, the token turns out to not be valid by the time the system gets around to running the test.

The errors are like:

in output log:

{{{
...
Traceback (most recent call last):
  File "keystone/token/provider.py", line 188, in _is_valid_token
    expires_at = token_data['token']['expires']
KeyError: 'token'
...}}}

Traceback (most recent call last):
  File "keystone/tests/test_token_provider.py", line 818, in test_provider_token_expiration_validation
    self.token_provider_api._is_valid_token(SAMPLE_V2_TOKEN_VALID))
  File "keystone/token/provider.py", line 202, in _is_valid_token
    raise exception.TokenNotFound(_('Failed to validate token'))
TokenNotFound: Failed to validate token

There's probably another issue indicated here since we shouldn't be
getting a KeyError in the case of an expired token.

** Affects: keystone
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1278550

Title:
  test_provider_token_expiration_validation tests fails on slow system

Status in OpenStack Identity (Keystone):
  New

Bug description:
  
  The keystone.tests.test_token_provider.TestTokenProvider.test_provider_token_expiration_validation test fails on a system where it takes a long time to run the tests. The problem is that the test is expecting the token to be valid, but with the long run time and the shorter default token expiration time, the token turns out to not be valid by the time the system gets around to running the test.

  The errors are like:

  in output log:

  {{{
  ...
  Traceback (most recent call last):
    File "keystone/token/provider.py", line 188, in _is_valid_token
      expires_at = token_data['token']['expires']
  KeyError: 'token'
  ...}}}

  Traceback (most recent call last):
    File "keystone/tests/test_token_provider.py", line 818, in test_provider_token_expiration_validation
      self.token_provider_api._is_valid_token(SAMPLE_V2_TOKEN_VALID))
    File "keystone/token/provider.py", line 202, in _is_valid_token
      raise exception.TokenNotFound(_('Failed to validate token'))
  TokenNotFound: Failed to validate token

  There's probably another issue indicated here since we shouldn't be
  getting a KeyError in the case of an expired token.

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


Follow ups

References