SatelliteQE/robottelo — pull request #1741 by Ichimonji10 (2014-11-24 14:19:49+00:00)
Title: Skip tests that fail due to BZ 1166365

Deleting a repository is an asynchronous task, and there's no way to monitor the
progress of the deletion except by polling to see if that repository still
exists. This is problematic, and it's exacerbated by the fact that the task can
take a significant (10+ seconds) amount of time. When a client deletes a
repository, the server should either block until the deletion is done, or it
should return a task that can be monitored.

Here's a simple script that I've used to test this issue (it depends on some robottelo code):

#!/usr/bin/env python2
from robottelo.entities import Repository
from time import sleep
repo_id = Repository().create_json()['id']
repo = Repository(id=repo_id)
print('Target: 200, actual: {0}'.format(repo.read_raw().status_code))
repo.delete()
print('Target: 404, actual: {0}'.format(repo.read_raw().status_code))
sleep(10)
print('Target: 404, actual: {0}'.format(repo.read_raw().status_code))

And here's some output I've received:

Target: 200, actual: 200
Target: 404, actual: 200
Target: 404, actual: 500