test_ppa_assigner.PPAAssignerTest.test_next_page_ppa failure

Bug #1312621 reported by Vincent Ladeuil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu CI Engine
Fix Released
High
Chris Johnston

Bug Description

Traceback (most recent call last):
  File "tests/test_ppa_assigner.py", line 131, in test_next_page_ppa
    resp, content = self.get_server_status_and_content(url)
  File "tests/test_ppa_assigner.py", line 32, in get_server_status_and_content
    final_url = url.format(*self.get_ip_and_port('ppa-django'))
  File "tests/deployers.py", line 84, in get_ip_and_port
    port, _ = units['%s/%d' % (service, unit)]['open-ports'][0].split('/')
KeyError: 'open-ports'

most probably a race somewhere as this happens once in a while

The other failure mode for this test is:

======================================================================
FAIL: test_ppa_assigner.PPAAssignerTest.test_next_page_ppa
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_ppa_assigner.py", line 138, in test_next_page_ppa
    content['objects'][0]['resource_uri'])
  File "/usr/lib/python2.7/unittest/case.py", line 515, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib/python2.7/unittest/case.py", line 508, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: '/api/v1/ppa/1/' != u'/api/v1/ppa/2/'

I've seen a few times but not since I originally reported this bug, it just happened again.

Tags: airline

Related branches

Vincent Ladeuil (vila)
description: updated
Revision history for this message
Chris Johnston (cjohnston) wrote :

I see this regularly.

Revision history for this message
Para Siva (psivaa) wrote :

IIRC, the second failure mode will happen if the tests are repetitively run on a deployed engine. In this case, every other test run should see this failure. What happens is when we reserve and release ppa's, the ppa's in the pool are listed based on the timestamps and the first one to get reserved in the first run gets released as the second one to to the pool. So the ppa for 'next' would alternate if we run the tests repetitively.

IMHO, we probably need to find a logic to suite both cases (run once and run repetitively) or the test needs to be taken out.

PS. If this is happening during every runs as opposed to every other runs, then my theory is wrong and apologies for the noise.

Changed in uci-engine:
assignee: nobody → Chris Johnston (cjohnston)
status: Triaged → In Progress
Ubuntu CI Bot (uci-bot)
Changed in uci-engine:
status: In Progress → Fix Committed
Vincent Ladeuil (vila)
Changed in uci-engine:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.