17:58:14 =================================== FAILURES ===================================
17:58:14 ______________ SyncInvalidFeedTestCase.test_task_error_traceback _______________
17:58:14
17:58:14 self = <pulp_2_tests.tests.puppet.api_v2.test_sync_publish.SyncInvalidFeedTestCase testMethod=test_task_error_traceback>
17:58:14
17:58:14 def test_task_error_traceback(self):
17:58:14 """Assert the task's "error" and "traceback" fields are non-null."""
17:58:14 for key in {'error', 'traceback'}:
17:58:14 with self.subTest(key=key):
17:58:14 > self.assertIsNotNone(self.tasks[0][key])
17:58:14 E AssertionError: unexpectedly None
17:58:14
17:58:14 ../../.virtualenvs/pulp-2-tests/lib64/python3.5/site-packages/pulp_2_tests/tests/puppet/api_v2/test_sync_publish.py:213: AssertionError
17:58:14 ______________ OpenSuseErrataTestCase.test_01_create_sync_publish ______________
17:58:14
17:58:14 self = <pulp_2_tests.tests.rpm.api_v2.test_updateinfo.OpenSuseErrataTestCase testMethod=test_01_create_sync_publish>
17:58:14
17:58:14 def test_01_create_sync_publish(self):
17:58:14 """Create, sync, and publish an openSUSE repository."""
17:58:14 cfg = config.get_config()
17:58:14 if not selectors.bug_is_fixed(3377, cfg.pulp_version):
17:58:14 self.skipTest('https://pulp.plan.io/issues/3377')
17:58:14
17:58:14 # Create, sync, and publish a repository.
17:58:14 client = api.Client(cfg, api.json_handler)
17:58:14 body = gen_repo()
17:58:14 body['importer_config']['download_policy'] = 'on_demand'
17:58:14 body['importer_config']['feed'] = OPENSUSE_FEED_URL
17:58:14 body['distributors'] = [gen_distributor()]
17:58:14 repo = client.post(REPOSITORY_PATH, body)
17:58:14 self.addCleanup(client.delete, repo['_href'])
17:58:14 > sync_repo(cfg, repo)
17:58:14
17:58:14 ../../.virtualenvs/pulp-2-tests/lib64/python3.5/site-packages/pulp_2_tests/tests/rpm/api_v2/test_updateinfo.py:621:
17:58:14 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
17:58:14 ../../.virtualenvs/pulp-2-tests/lib64/python3.5/site-packages/pulp_smash/pulp2/utils.py:483: in sync_repo
17:58:14 return api.Client(cfg).post(urljoin(repo['_href'], 'actions/sync/'))
17:58:14 ../../.virtualenvs/pulp-2-tests/lib64/python3.5/site-packages/pulp_smash/api.py:443: in post
17:58:14 return self.request('POST', url, **kwargs)
17:58:14 ../../.virtualenvs/pulp-2-tests/lib64/python3.5/site-packages/pulp_smash/api.py:481: in request
17:58:14 requests.request(method, **request_kwargs),
17:58:14 ../../.virtualenvs/pulp-2-tests/lib64/python3.5/site-packages/pulp_smash/api.py:135: in safe_handler
17:58:14 _handle_202(client._cfg, response, client.pulp_host) # pylint:disable=protected-access
17:58:14 ../../.virtualenvs/pulp-2-tests/lib64/python3.5/site-packages/pulp_smash/api.py:83: in _handle_202
17:58:14 tasks = tuple(poll_spawned_tasks(cfg, call_report, pulp_host))
17:58:14 ../../.virtualenvs/pulp-2-tests/lib64/python3.5/site-packages/pulp_smash/api.py:507: in poll_spawned_tasks
17:58:14 for final_task_state in poll_task(cfg, href, pulp_host):
17:58:14 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
17:58:14
17:58:14 cfg = PulpSmashConfig(pulp_version='2.16.4', pulp_auth=['admin', 'admin'], hosts=[PulpHost(hostname='host-172-16-46-13.opens...erify': '/etc/pki/ca-trust/source/anchors/pulp-cacert.pem'}, 'pulp resource manager': {}})], pulp_selinux_enabled=True)
17:58:14 href = '/pulp/api/v2/tasks/007c7852-068f-49a3-b8e9-63a38bffc7d0/'
17:58:14 pulp_host = PulpHost(hostname='host-172-16-46-13.openstacklocal', roles={'amqp broker': {'service': 'qpidd'}, 'pulp cli': {}, 'pul...'api': {'scheme': 'https', 'verify': '/etc/pki/ca-trust/source/anchors/pulp-cacert.pem'}, 'pulp resource manager': {}})
17:58:14
17:58:14 def poll_task(cfg, href, pulp_host=None):
17:58:14 """Wait for a task and its children to complete. Yield response bodies.
17:58:14
17:58:14 Poll the task at ``href``, waiting for the task to complete. When a
17:58:14 response is received indicating that the task is complete, yield that
17:58:14 response body and recursively poll each child task.
17:58:14
17:58:14 :param cfg: A :class:`pulp_smash.config.PulpSmashConfig` object.
17:58:14 :param href: The path to a task you'd like to monitor recursively.
17:58:14 :param pulp_host: The host to poll. If ``None``, a host will automatically
17:58:14 be selected by :class:`Client`.
17:58:14 :returns: An generator yielding response bodies.
17:58:14 :raises pulp_smash.exceptions.TaskTimedOutError: If a task takes too
17:58:14 long to complete.
17:58:14 """
17:58:14 # 900 * 2s == 1800s == 30m
17:58:14 # NOTE: The timeout counter is synchronous. We query Pulp, then count down,
17:58:14 # then query pulp, then count down, etc. This is… dumb.
17:58:14 poll_limit = 900
17:58:14 poll_counter = 0
17:58:14 json_client = Client(cfg, json_handler, pulp_host=pulp_host)
17:58:14 while True:
17:58:14 task = json_client.get(href)
17:58:14 if cfg.pulp_version < Version('3'):
17:58:14 task_end_states = _TASK_END_STATES
17:58:14 else:
17:58:14 task_end_states = _P3_TASK_END_STATES
17:58:14 if task['state'] in task_end_states:
17:58:14 # This task has completed. Yield its final state, then recursively
17:58:14 # iterate through children and yield their final states.
17:58:14 yield task
17:58:14 for spawned_task in task['spawned_tasks']:
17:58:14 for descendant_tsk in poll_task(cfg, spawned_task['_href'], pulp_host):
17:58:14 yield descendant_tsk
17:58:14 break
17:58:14 poll_counter += 1
17:58:14 if poll_counter > poll_limit:
17:58:14 raise exceptions.TaskTimedOutError(
17:58:14 > 'Task {} is ongoing after {} polls.'.format(href, poll_limit)
17:58:14 )
17:58:14 E pulp_smash.exceptions.TaskTimedOutError: Task /pulp/api/v2/tasks/007c7852-068f-49a3-b8e9-63a38bffc7d0/ is ongoing after 900 polls.
17:58:14
17:58:14 ../../.virtualenvs/pulp-2-tests/lib64/python3.5/site-packages/pulp_smash/api.py:549: TaskTimedOutError