Reduce visual noise during distributed build (#23338)
This commit is contained in:
parent
dfcd01f2c7
commit
e5d87b711d
2 changed files with 7 additions and 3 deletions
|
@ -1276,8 +1276,8 @@ def _requeue_task(self, task):
|
||||||
task (BuildTask): the installation build task for a package
|
task (BuildTask): the installation build task for a package
|
||||||
"""
|
"""
|
||||||
if task.status not in [STATUS_INSTALLED, STATUS_INSTALLING]:
|
if task.status not in [STATUS_INSTALLED, STATUS_INSTALLING]:
|
||||||
tty.msg('{0} {1}'.format(install_msg(task.pkg_id, self.pid),
|
tty.debug('{0} {1}'.format(install_msg(task.pkg_id, self.pid),
|
||||||
'in progress by another process'))
|
'in progress by another process'))
|
||||||
|
|
||||||
new_task = task.next_attempt(self.installed)
|
new_task = task.next_attempt(self.installed)
|
||||||
new_task.status = STATUS_INSTALLING
|
new_task.status = STATUS_INSTALLING
|
||||||
|
|
|
@ -777,7 +777,11 @@ def test_requeue_task(install_mockery, capfd):
|
||||||
installer = create_installer(const_arg)
|
installer = create_installer(const_arg)
|
||||||
task = create_build_task(installer.build_requests[0].pkg)
|
task = create_build_task(installer.build_requests[0].pkg)
|
||||||
|
|
||||||
|
# temporarily set tty debug messages on so we can test output
|
||||||
|
current_debug_level = tty.debug_level()
|
||||||
|
tty.set_debug(1)
|
||||||
installer._requeue_task(task)
|
installer._requeue_task(task)
|
||||||
|
tty.set_debug(current_debug_level)
|
||||||
|
|
||||||
ids = list(installer.build_tasks)
|
ids = list(installer.build_tasks)
|
||||||
assert len(ids) == 1
|
assert len(ids) == 1
|
||||||
|
@ -786,7 +790,7 @@ def test_requeue_task(install_mockery, capfd):
|
||||||
assert qtask.sequence > task.sequence
|
assert qtask.sequence > task.sequence
|
||||||
assert qtask.attempts == task.attempts + 1
|
assert qtask.attempts == task.attempts + 1
|
||||||
|
|
||||||
out = capfd.readouterr()[0]
|
out = capfd.readouterr()[1]
|
||||||
assert 'Installing a' in out
|
assert 'Installing a' in out
|
||||||
assert ' in progress by another process' in out
|
assert ' in progress by another process' in out
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue