Source: billiard, celery
Control: found -1 billiard/4.0.2-1
Control: found -1 celery/5.2.6-2
Severity: serious
Tags: sid bookworm
User: debian...@lists.debian.org
Usertags: breaks needs-update

Dear maintainer(s),

With a recent upload of billiard the autopkgtest of celery fails in testing when that autopkgtest is run with the binary packages of billiard from unstable. It passes when run with only packages from testing. In tabular form:

                       pass            fail
billiard               from testing    4.0.2-1
celery                 from testing    5.2.6-2
all others             from testing    from testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of billiard to testing [1]. Due to the nature of this issue, I filed this bug report against both packages. Can you please investigate the situation and reassign the bug to the right package?

More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[1] https://qa.debian.org/excuses.php?package=billiard

https://ci.debian.net/data/autopkgtest/testing/amd64/c/celery/26573246/log.gz

=================================== FAILURES =================================== ______________________ test_EagerResult.test_wait_raises _______________________

self = <t.unit.tasks.test_result.test_EagerResult object at 0x7fbc3ef9b760>

    def test_wait_raises(self):
        res = self.raising.apply(args=[3, 3])
        with pytest.raises(KeyError):
          res.wait()

t/unit/tasks/test_result.py:946: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <EagerResult: 09b01603-8e3c-4417-8c1c-0c906d383510>, timeout = None
propagate = True, disable_sync_subtasks = True, kwargs = {}

    def get(self, timeout=None, propagate=True,
            disable_sync_subtasks=True, **kwargs):
        if disable_sync_subtasks:
            assert_will_not_block()
            if self.successful():
            return self.result
        elif self.state in states.PROPAGATE_STATES:
            if propagate:
              raise self.result if isinstance(
                    self.result, Exception) else Exception(self.result)
E               billiard.einfo.ExceptionWithTraceback: E               """
E               Traceback (most recent call last):
E File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 451, in trace_task
E                   R = retval = fun(*args, **kwargs)
E File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/tasks/test_result.py", line 940, in raising
E                   raise KeyError(x, y)
E               KeyError: (3, 3)
E               """

celery/result.py:1005: ExceptionWithTraceback
------------------------------ Captured log call ------------------------------- ERROR celery.app.trace:trace.py:265 Task t.unit.tasks.test_result.raising[09b01603-8e3c-4417-8c1c-0c906d383510] raised unexpected: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/tasks/test_result.py", line 940, in raising
    raise KeyError(x, y)
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/tasks/test_result.py", line 940, in raising
    raise KeyError(x, y)
KeyError: (3, 3)
"""
_________________________ test_task_retries.test_retry _________________________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f337220>

    def test_retry(self):
        self.retry_task.max_retries = 3
        self.retry_task.iterations = 0
        self.retry_task.apply([0xFF, 0xFFFF])
      assert self.retry_task.iterations == 4
E       assert 1 == 4
E + where 1 = <@task: t.unit.tasks.test_tasks.retry_task of celery.tests at 0x7fbc36762350>.iterations E + where <@task: t.unit.tasks.test_tasks.retry_task of celery.tests at 0x7fbc36762350> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f337220>.retry_task

t/unit/tasks/test_tasks.py:380: AssertionError
_____________________ test_task_retries.test_retry_no_args _____________________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f3369e0>

    def test_retry_no_args(self):
        self.retry_task_noargs.max_retries = 3
        self.retry_task_noargs.iterations = 0
        self.retry_task_noargs.apply(propagate=True).get()
      assert self.retry_task_noargs.iterations == 4
E       assert 1 == 4
E + where 1 = <@task: t.unit.tasks.test_tasks.retry_task_noargs of celery.tests at 0x7fbc36760640>.iterations E + where <@task: t.unit.tasks.test_tasks.retry_task_noargs of celery.tests at 0x7fbc36760640> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f3369e0>.retry_task_noargs

t/unit/tasks/test_tasks.py:407: AssertionError
_______________ test_task_retries.test_raise_without_throw_eager _______________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f335300>

    def test_raise_without_throw_eager(self):
      assert self.retry_task_raise_without_throw.apply().get() == 42
E       assert None == 42
E + where None = <bound method EagerResult.get of <EagerResult: 05f1f63e-f34d-4b58-9e87-66de01509c80>>() E + where <bound method EagerResult.get of <EagerResult: 05f1f63e-f34d-4b58-9e87-66de01509c80>> = <EagerResult: 05f1f63e-f34d-4b58-9e87-66de01509c80>.get E + where <EagerResult: 05f1f63e-f34d-4b58-9e87-66de01509c80> = <bound method Task.apply of <@task: t.unit.tasks.test_tasks.retry_task_raise_without_throw of celery.tests at 0x7fbc367850c0>>() E + where <bound method Task.apply of <@task: t.unit.tasks.test_tasks.retry_task_raise_without_throw of celery.tests at 0x7fbc367850c0>> = <@task: t.unit.tasks.test_tasks.retry_task_raise_without_throw of celery.tests at 0x7fbc367850c0>.apply E + where <@task: t.unit.tasks.test_tasks.retry_task_raise_without_throw of celery.tests at 0x7fbc367850c0> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f335300>.retry_task_raise_without_throw

t/unit/tasks/test_tasks.py:448: AssertionError
________________ test_task_retries.test_return_with_throw_eager ________________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f334fd0>

    def test_return_with_throw_eager(self):
      assert self.retry_task_return_with_throw.apply().get() == 42
E       assert None == 42
E + where None = <bound method EagerResult.get of <EagerResult: b3221db5-79aa-4b00-b3a8-7b818b4e397a>>() E + where <bound method EagerResult.get of <EagerResult: b3221db5-79aa-4b00-b3a8-7b818b4e397a>> = <EagerResult: b3221db5-79aa-4b00-b3a8-7b818b4e397a>.get E + where <EagerResult: b3221db5-79aa-4b00-b3a8-7b818b4e397a> = <bound method Task.apply of <@task: t.unit.tasks.test_tasks.retry_task_return_with_throw of celery.tests at 0x7fbc369fe140>>() E + where <bound method Task.apply of <@task: t.unit.tasks.test_tasks.retry_task_return_with_throw of celery.tests at 0x7fbc369fe140>> = <@task: t.unit.tasks.test_tasks.retry_task_return_with_throw of celery.tests at 0x7fbc369fe140>.apply E + where <@task: t.unit.tasks.test_tasks.retry_task_return_with_throw of celery.tests at 0x7fbc369fe140> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f334fd0>.retry_task_return_with_throw

t/unit/tasks/test_tasks.py:451: AssertionError
__________ test_task_retries.test_eager_retry_with_single_new_params ___________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f335150>

    def test_eager_retry_with_single_new_params(self):
      assert self.retry_task_auto_retry_with_single_new_arg.apply().get() == 
"test"
E       AssertionError: assert None == 'test'
E + where None = <bound method EagerResult.get of <EagerResult: 2755ac07-a8ad-418f-ba1b-00ed0b72a854>>() E + where <bound method EagerResult.get of <EagerResult: 2755ac07-a8ad-418f-ba1b-00ed0b72a854>> = <EagerResult: 2755ac07-a8ad-418f-ba1b-00ed0b72a854>.get E + where <EagerResult: 2755ac07-a8ad-418f-ba1b-00ed0b72a854> = <bound method Task.apply of <@task: t.unit.tasks.test_tasks.retry_task_auto_retry_with_single_new_arg of celery.tests at 0x7fbc369ffdc0>>() E + where <bound method Task.apply of <@task: t.unit.tasks.test_tasks.retry_task_auto_retry_with_single_new_arg of celery.tests at 0x7fbc369ffdc0>> = <@task: t.unit.tasks.test_tasks.retry_task_auto_retry_with_single_new_arg of celery.tests at 0x7fbc369ffdc0>.apply E + where <@task: t.unit.tasks.test_tasks.retry_task_auto_retry_with_single_new_arg of celery.tests at 0x7fbc369ffdc0> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f335150>.retry_task_auto_retry_with_single_new_arg

t/unit/tasks/test_tasks.py:454: AssertionError
______________ test_task_retries.test_eager_retry_with_new_params ______________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f334df0>

    def test_eager_retry_with_new_params(self):
      assert 
self.retry_task_auto_retry_with_new_args.si(place_holder="test").apply().get() == 
"test"
E       AssertionError: assert None == 'test'
E + where None = <bound method EagerResult.get of <EagerResult: f0b982fd-7ff0-455c-80c5-78ee8829e144>>() E + where <bound method EagerResult.get of <EagerResult: f0b982fd-7ff0-455c-80c5-78ee8829e144>> = <EagerResult: f0b982fd-7ff0-455c-80c5-78ee8829e144>.get E + where <EagerResult: f0b982fd-7ff0-455c-80c5-78ee8829e144> = <bound method Signature.apply of t.unit.tasks.test_tasks.retry_task_auto_retry_with_new_args(place_holder='test')>() E + where <bound method Signature.apply of t.unit.tasks.test_tasks.retry_task_auto_retry_with_new_args(place_holder='test')> = t.unit.tasks.test_tasks.retry_task_auto_retry_with_new_args(place_holder='test').apply E + where t.unit.tasks.test_tasks.retry_task_auto_retry_with_new_args(place_holder='test') = <bound method Task.si of <@task: t.unit.tasks.test_tasks.retry_task_auto_retry_with_new_args of celery.tests at 0x7fbc36947f40>>(place_holder='test') E + where <bound method Task.si of <@task: t.unit.tasks.test_tasks.retry_task_auto_retry_with_new_args of celery.tests at 0x7fbc36947f40>> = <@task: t.unit.tasks.test_tasks.retry_task_auto_retry_with_new_args of celery.tests at 0x7fbc36947f40>.si E + where <@task: t.unit.tasks.test_tasks.retry_task_auto_retry_with_new_args of celery.tests at 0x7fbc36947f40> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f334df0>.retry_task_auto_retry_with_new_args

t/unit/tasks/test_tasks.py:457: AssertionError
_______ test_task_retries.test_eager_retry_with_autoretry_for_exception ________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f334880>

    def test_eager_retry_with_autoretry_for_exception(self):
      assert 
self.retry_task_auto_retry_exception_with_new_args.si(place_holder="test").apply().get() 
== "test"
E       AssertionError: assert None == 'test'
E + where None = <bound method EagerResult.get of <EagerResult: e4ec2a30-9969-498d-9be3-c62dd019cdcc>>() E + where <bound method EagerResult.get of <EagerResult: e4ec2a30-9969-498d-9be3-c62dd019cdcc>> = <EagerResult: e4ec2a30-9969-498d-9be3-c62dd019cdcc>.get E + where <EagerResult: e4ec2a30-9969-498d-9be3-c62dd019cdcc> = <bound method Signature.apply of t.unit.tasks.test_tasks.retry_task_auto_retry_exception_with_new_args(place_holder='test')>() E + where <bound method Signature.apply of t.unit.tasks.test_tasks.retry_task_auto_retry_exception_with_new_args(place_holder='test')> = t.unit.tasks.test_tasks.retry_task_auto_retry_exception_with_new_args(place_holder='test').apply E + where t.unit.tasks.test_tasks.retry_task_auto_retry_exception_with_new_args(place_holder='test') = <bound method Task.si of <@task: t.unit.tasks.test_tasks.retry_task_auto_retry_exception_with_new_args of celery.tests at 0x7fbc36945330>>(place_holder='test') E + where <bound method Task.si of <@task: t.unit.tasks.test_tasks.retry_task_auto_retry_exception_with_new_args of celery.tests at 0x7fbc36945330>> = <@task: t.unit.tasks.test_tasks.retry_task_auto_retry_exception_with_new_args of celery.tests at 0x7fbc36945330>.si E + where <@task: t.unit.tasks.test_tasks.retry_task_auto_retry_exception_with_new_args of celery.tests at 0x7fbc36945330> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f334880>.retry_task_auto_retry_exception_with_new_args

t/unit/tasks/test_tasks.py:460: AssertionError
____________ test_task_retries.test_retry_task_max_retries_override ____________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f334340>

    def test_retry_task_max_retries_override(self):
        self.retry_task_max_retries_override.max_retries = 10
        self.retry_task_max_retries_override.iterations = 0
        result = self.retry_task_max_retries_override.apply()
      with pytest.raises(MyCustomException):
E Failed: DID NOT RAISE <class 't.unit.tasks.test_tasks.MyCustomException'>

t/unit/tasks/test_tasks.py:466: Failed
_____________ test_task_retries.test_retry_task_explicit_exception _____________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f334520>

    def test_retry_task_explicit_exception(self):
        self.retry_task_explicit_exception.max_retries = 0
        self.retry_task_explicit_exception.iterations = 0
        result = self.retry_task_explicit_exception.apply()
        with pytest.raises(MyCustomException):
          result.get()

t/unit/tasks/test_tasks.py:475: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <EagerResult: ed4c537d-3949-4754-8de3-2041095881a0>, timeout = None
propagate = True, disable_sync_subtasks = True, kwargs = {}

    def get(self, timeout=None, propagate=True,
            disable_sync_subtasks=True, **kwargs):
        if disable_sync_subtasks:
            assert_will_not_block()
            if self.successful():
            return self.result
        elif self.state in states.PROPAGATE_STATES:
            if propagate:
              raise self.result if isinstance(
                    self.result, Exception) else Exception(self.result)
E               billiard.einfo.ExceptionWithTraceback: E               """
E               Traceback (most recent call last):
E File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 451, in trace_task
E                   R = retval = fun(*args, **kwargs)
E File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/autoretry.py", line 54, in run
E                   ret = task.retry(exc=exc, **retry_kwargs)
E File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/task.py", line 717, in retry
E                   raise_with_context(exc)
E File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/autoretry.py", line 34, in run
E                   return task._orig_run(*args, **kwargs)
E File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/tasks/test_tasks.py", line 164, in retry_task_explicit_exception
E                   raise MyCustomException()
E               t.unit.tasks.test_tasks.MyCustomException
E               """

celery/result.py:1005: ExceptionWithTraceback
------------------------------ Captured log call ------------------------------- ERROR celery.app.trace:trace.py:265 Task t.unit.tasks.test_tasks.retry_task_explicit_exception[ed4c537d-3949-4754-8de3-2041095881a0] raised unexpected: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/autoretry.py", line 54, in run
    ret = task.retry(exc=exc, **retry_kwargs)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/task.py", line 717, in retry
    raise_with_context(exc)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/autoretry.py", line 34, in run
    return task._orig_run(*args, **kwargs)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/tasks/test_tasks.py", line 164, in retry_task_explicit_exception
    raise MyCustomException()
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/autoretry.py", line 54, in run
    ret = task.retry(exc=exc, **retry_kwargs)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/task.py", line 717, in retry
    raise_with_context(exc)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/autoretry.py", line 34, in run
    return task._orig_run(*args, **kwargs)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/tasks/test_tasks.py", line 164, in retry_task_explicit_exception
    raise MyCustomException()
t.unit.tasks.test_tasks.MyCustomException
"""
____________ test_task_retries.test_retry_eager_should_return_value ____________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f337c70>

    def test_retry_eager_should_return_value(self):
        self.retry_task.max_retries = 3
        self.retry_task.iterations = 0
      assert self.retry_task.apply([0xFF, 0xFFFF]).get() == 0xFF
E       assert None == 255
E + where None = <bound method EagerResult.get of <EagerResult: 3a59afcc-9893-4b2c-ad16-b78c5208b694>>() E + where <bound method EagerResult.get of <EagerResult: 3a59afcc-9893-4b2c-ad16-b78c5208b694>> = <EagerResult: 3a59afcc-9893-4b2c-ad16-b78c5208b694>.get E + where <EagerResult: 3a59afcc-9893-4b2c-ad16-b78c5208b694> = <bound method Task.apply of <@task: t.unit.tasks.test_tasks.retry_task of celery.tests at 0x7fbc369373d0>>([255, 65535]) E + where <bound method Task.apply of <@task: t.unit.tasks.test_tasks.retry_task of celery.tests at 0x7fbc369373d0>> = <@task: t.unit.tasks.test_tasks.retry_task of celery.tests at 0x7fbc369373d0>.apply E + where <@task: t.unit.tasks.test_tasks.retry_task of celery.tests at 0x7fbc369373d0> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f337c70>.retry_task

t/unit/tasks/test_tasks.py:481: AssertionError
___________________ test_task_retries.test_retry_with_kwargs ___________________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb309d0>

    def test_retry_with_kwargs(self):
        self.retry_task_customexc.max_retries = 3
        self.retry_task_customexc.iterations = 0
        self.retry_task_customexc.apply([0xFF, 0xFFFF], {'kwarg': 0xF})
      assert self.retry_task_customexc.iterations == 4
E       assert 1 == 4
E + where 1 = <@task: t.unit.tasks.test_tasks.retry_task_customexc of celery.tests at 0x7fbc369f7d90>.iterations E + where <@task: t.unit.tasks.test_tasks.retry_task_customexc of celery.tests at 0x7fbc369f7d90> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb309d0>.retry_task_customexc

t/unit/tasks/test_tasks.py:513: AssertionError
______________ test_task_retries.test_retry_with_custom_exception ______________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb333a0>

    def test_retry_with_custom_exception(self):
        self.retry_task_customexc.max_retries = 2
        self.retry_task_customexc.iterations = 0
        result = self.retry_task_customexc.apply(
            [0xFF, 0xFFFF], {'kwarg': 0xF},
        )
      with pytest.raises(MyCustomException):
E Failed: DID NOT RAISE <class 't.unit.tasks.test_tasks.MyCustomException'>

t/unit/tasks/test_tasks.py:521: Failed
_________________ test_task_retries.test_max_retries_exceeded __________________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb31000>

    def test_max_retries_exceeded(self):
        self.retry_task.max_retries = 2
        self.retry_task.iterations = 0
        result = self.retry_task.apply([0xFF, 0xFFFF], {'care': False})
      with pytest.raises(self.retry_task.MaxRetriesExceededError):
E Failed: DID NOT RAISE <class 'celery.exceptions.MaxRetriesExceededError'>

t/unit/tasks/test_tasks.py:529: Failed
____________ test_task_retries.test_max_retries_exceeded_task_args _____________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb33bb0>

    def test_max_retries_exceeded_task_args(self):
        self.retry_task.max_retries = 2
        self.retry_task.iterations = 0
        args = (0xFF, 0xFFFF)
        kwargs = {'care': False}
        result = self.retry_task.apply(args, kwargs)
      with pytest.raises(self.retry_task.MaxRetriesExceededError) as e:
E Failed: DID NOT RAISE <class 'celery.exceptions.MaxRetriesExceededError'>

t/unit/tasks/test_tasks.py:546: Failed
__________________ test_task_retries.test_autoretry_no_kwargs __________________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb32a10>

    def test_autoretry_no_kwargs(self):
        self.autoretry_task_no_kwargs.max_retries = 3
        self.autoretry_task_no_kwargs.iterations = 0
        self.autoretry_task_no_kwargs.apply((1, 0))
      assert self.autoretry_task_no_kwargs.iterations == 4
E       assert 1 == 4
E + where 1 = <@task: t.unit.tasks.test_tasks.autoretry_task_no_kwargs of celery.tests at 0x7fbc3691dcf0>.iterations E + where <@task: t.unit.tasks.test_tasks.autoretry_task_no_kwargs of celery.tests at 0x7fbc3691dcf0> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb32a10>.autoretry_task_no_kwargs

t/unit/tasks/test_tasks.py:556: AssertionError
_______________________ test_task_retries.test_autoretry _______________________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb32650>

    def test_autoretry(self):
        self.autoretry_task.max_retries = 3
        self.autoretry_task.iterations = 0
        self.autoretry_task.apply((1, 0))
      assert self.autoretry_task.iterations == 6
E       assert 1 == 6
E + where 1 = <@task: t.unit.tasks.test_tasks.autoretry_task of celery.tests at 0x7fbc3691cd90>.iterations E + where <@task: t.unit.tasks.test_tasks.autoretry_task of celery.tests at 0x7fbc3691cd90> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb32650>.autoretry_task

t/unit/tasks/test_tasks.py:562: AssertionError
___________________ test_task_retries.test_autoretry_backoff ___________________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f335750>
randrange = <MagicMock name='randrange' id='140446346903504'>

    @patch('random.randrange', side_effect=lambda i: i - 1)
    def test_autoretry_backoff(self, randrange):
        task = self.autoretry_backoff_task
        task.max_retries = 3
        task.iterations = 0
with patch.object(task, 'retry', wraps=task.retry) as fake_retry:
            task.apply(("http://httpbin.org/error";,))
    >       assert task.iterations == 4
E       assert 1 == 4
E + where 1 = <@task: t.unit.tasks.test_tasks.autoretry_backoff_task of celery.tests at 0x7fbc3691d0f0>.iterations

t/unit/tasks/test_tasks.py:573: AssertionError
_______________ test_task_retries.test_autoretry_backoff_jitter ________________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb33ca0>
randrange = <MagicMock name='randrange' id='140446346296240'>

    @patch('random.randrange', side_effect=lambda i: i - 2)
    def test_autoretry_backoff_jitter(self, randrange):
        task = self.autoretry_backoff_jitter_task
        task.max_retries = 3
        task.iterations = 0
with patch.object(task, 'retry', wraps=task.retry) as fake_retry:
            task.apply(("http://httpbin.org/error";,))
    >       assert task.iterations == 4
E       assert 1 == 4
E + where 1 = <@task: t.unit.tasks.test_tasks.autoretry_backoff_jitter_task of celery.tests at 0x7fbc3691f3a0>.iterations

t/unit/tasks/test_tasks.py:588: AssertionError
________________ test_task_retries.test_autoretry_for_from_base ________________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb316f0>

    def test_autoretry_for_from_base(self):
        self.autoretry_for_from_base_task.iterations = 0
        self.autoretry_for_from_base_task.apply((1, "a"))
      assert self.autoretry_for_from_base_task.iterations == 6
E       assert 1 == 6
E + where 1 = <@task: t.unit.tasks.test_tasks.autoretry_for_from_base_task of celery.tests at 0x7fbc3694be20>.iterations E + where <@task: t.unit.tasks.test_tasks.autoretry_for_from_base_task of celery.tests at 0x7fbc3694be20> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb316f0>.autoretry_for_from_base_task

t/unit/tasks/test_tasks.py:597: AssertionError
___________ test_task_retries.test_override_autoretry_for_from_base ____________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb32fb0>

    def test_override_autoretry_for_from_base(self):
        self.override_autoretry_for.iterations = 0
        self.override_autoretry_for.apply((1, 0))
      assert self.override_autoretry_for.iterations == 6
E       assert 1 == 6
E + where 1 = <@task: t.unit.tasks.test_tasks.override_autoretry_for_from_base_task of celery.tests at 0x7fbc3661fa60>.iterations E + where <@task: t.unit.tasks.test_tasks.override_autoretry_for_from_base_task of celery.tests at 0x7fbc3661fa60> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb32fb0>.override_autoretry_for

t/unit/tasks/test_tasks.py:602: AssertionError
________________ test_task_retries.test_retry_kwargs_from_base _________________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb30610>

    def test_retry_kwargs_from_base(self):
        self.retry_kwargs_from_base_task.iterations = 0
        self.retry_kwargs_from_base_task.apply((1, "a"))
      assert self.retry_kwargs_from_base_task.iterations == 6
E       assert 1 == 6
E + where 1 = <@task: t.unit.tasks.test_tasks.retry_kwargs_from_base_task of celery.tests at 0x7fbc369b9d50>.iterations E + where <@task: t.unit.tasks.test_tasks.retry_kwargs_from_base_task of celery.tests at 0x7fbc369b9d50> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb30610>.retry_kwargs_from_base_task

t/unit/tasks/test_tasks.py:607: AssertionError
____________ test_task_retries.test_override_retry_kwargs_from_base ____________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb31b70>

    def test_override_retry_kwargs_from_base(self):
        self.override_retry_kwargs.iterations = 0
        self.override_retry_kwargs.apply((1, "a"))
      assert self.override_retry_kwargs.iterations == 3
E       assert 1 == 3
E + where 1 = <@task: t.unit.tasks.test_tasks.override_retry_kwargs_from_base_task of celery.tests at 0x7fbc3661cdc0>.iterations E + where <@task: t.unit.tasks.test_tasks.override_retry_kwargs_from_base_task of celery.tests at 0x7fbc3661cdc0> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3eb31b70>.override_retry_kwargs

t/unit/tasks/test_tasks.py:612: AssertionError
________________ test_task_retries.test_retry_backoff_from_base ________________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f3f8040>

    def test_retry_backoff_from_base(self):
        task = self.retry_backoff_from_base_task
        task.iterations = 0
        with patch.object(task, 'retry', wraps=task.retry) as fake_retry:
            task.apply((1, "a"))
    >       assert task.iterations == 6
E       assert 1 == 6
E + where 1 = <@task: t.unit.tasks.test_tasks.retry_backoff_from_base_task of celery.tests at 0x7fbc369bac50>.iterations

t/unit/tasks/test_tasks.py:620: AssertionError
___________ test_task_retries.test_override_retry_backoff_from_base ____________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f3f9f90>
backoff = <MagicMock name='get_exponential_backoff_interval' id='140446343455760'>

    @patch('celery.app.autoretry.get_exponential_backoff_interval')
    def test_override_retry_backoff_from_base(self, backoff):
        self.override_retry_backoff.iterations = 0
        self.override_retry_backoff.apply((1, "a"))
      assert self.override_retry_backoff.iterations == 6
E       assert 1 == 6
E + where 1 = <@task: t.unit.tasks.test_tasks.override_retry_backoff_from_base_task of celery.tests at 0x7fbc366c71f0>.iterations E + where <@task: t.unit.tasks.test_tasks.override_retry_backoff_from_base_task of celery.tests at 0x7fbc366c71f0> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f3f9f90>.override_retry_backoff

t/unit/tasks/test_tasks.py:630: AssertionError
______________ test_task_retries.test_retry_backoff_max_from_base ______________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f3f9b10>

    def test_retry_backoff_max_from_base(self):
        task = self.retry_backoff_max_from_base_task
        task.iterations = 0
        with patch.object(task, 'retry', wraps=task.retry) as fake_retry:
            task.apply((1, "a"))
    >       assert task.iterations == 6
E       assert 1 == 6
E + where 1 = <@task: t.unit.tasks.test_tasks.retry_backoff_max_from_base_task of celery.tests at 0x7fbc36694850>.iterations

t/unit/tasks/test_tasks.py:639: AssertionError
_________ test_task_retries.test_override_retry_backoff_max_from_base __________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f3fb5b0>

    def test_override_retry_backoff_max_from_base(self):
        task = self.override_backoff_max
        task.iterations = 0
        with patch.object(task, 'retry', wraps=task.retry) as fake_retry:
            task.apply((1, "a"))
    >       assert task.iterations == 6
E       assert 1 == 6
E + where 1 = <@task: t.unit.tasks.test_tasks.override_retry_backoff_max_from_base_task of celery.tests at 0x7fbc36675570>.iterations

t/unit/tasks/test_tasks.py:651: AssertionError
____________ test_task_retries.test_retry_backoff_jitter_from_base _____________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3f3fb8b0>

    def test_retry_backoff_jitter_from_base(self):
        task = self.retry_backoff_jitter_from_base
        task.iterations = 0
        with patch.object(task, 'retry', wraps=task.retry) as fake_retry:
            task.apply((1, "a"))
    >       assert task.iterations == 6
E       assert 1 == 6
E + where 1 = <@task: t.unit.tasks.test_tasks.retry_backoff_jitter_from_base_task of celery.tests at 0x7fbc3661b3a0>.iterations

t/unit/tasks/test_tasks.py:663: AssertionError
___________ test_task_retries.test_override_backoff_jitter_from_base ___________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3ec0f520>
randrange = <MagicMock name='randrange' id='140446343815440'>

    @patch('random.randrange', side_effect=lambda i: i - 2)
    def test_override_backoff_jitter_from_base(self, randrange):
        task = self.override_backoff_jitter
        task.iterations = 0
        with patch.object(task, 'retry', wraps=task.retry) as fake_retry:
            task.apply((1, "a"))
    >       assert task.iterations == 6
E       assert 1 == 6
E + where 1 = <@task: t.unit.tasks.test_tasks.override_backoff_jitter_from_base_task of celery.tests at 0x7fbc3666f250>.iterations

t/unit/tasks/test_tasks.py:676: AssertionError
__________ test_task_retries.test_retry_wrong_eta_when_not_enable_utc __________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3ec0fc10>

    def test_retry_wrong_eta_when_not_enable_utc(self):
        """Issue #3753"""
        self.app.conf.enable_utc = False
        self.app.conf.timezone = 'US/Eastern'
        self.autoretry_task.iterations = 0
        self.autoretry_task.default_retry_delay = 2
            self.autoretry_task.apply((1, 0))
      assert self.autoretry_task.iterations == 6
E       assert 1 == 6
E + where 1 = <@task: t.unit.tasks.test_tasks.autoretry_task of celery.tests at 0x7fbc366efaf0>.iterations E + where <@task: t.unit.tasks.test_tasks.autoretry_task of celery.tests at 0x7fbc366efaf0> = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3ec0fc10>.autoretry_task

t/unit/tasks/test_tasks.py:690: AssertionError
______________ test_task_retries.test_autoretry_class_based_task _______________

self = <t.unit.tasks.test_tasks.test_task_retries object at 0x7fbc3ec0c850>

    def test_autoretry_class_based_task(self):
        class ClassBasedAutoRetryTask(Task):
            name = 'ClassBasedAutoRetryTask'
            autoretry_for = (ZeroDivisionError,)
            retry_kwargs = {'max_retries': 5}
            retry_backoff = True
            retry_backoff_max = 700
            retry_jitter = False
            iterations = 0
            _app = self.app
                def run(self, x, y):
                self.iterations += 1
                return x / y
            task = ClassBasedAutoRetryTask()
        self.app.tasks.register(task)
        task.iterations = 0
        task.apply([1, 0])
      assert task.iterations == 6
E       assert 1 == 6
E + where 1 = <@task: ClassBasedAutoRetryTask of celery.tests at 0x7fbc3667b430>.iterations

t/unit/tasks/test_tasks.py:711: AssertionError
__________________________ test_apply_task.test_apply __________________________

self = <t.unit.tasks.test_tasks.test_apply_task object at 0x7fbc3ebb82b0>

    def test_apply(self):
        self.increment_counter.count = 0
            e = self.increment_counter.apply()
        assert isinstance(e, EagerResult)
        assert e.get() == 1
            e = self.increment_counter.apply(args=[1])
        assert e.get() == 2
            e = self.increment_counter.apply(kwargs={'increment_by': 4})
        assert e.get() == 6
            assert e.successful()
        assert e.ready()
        assert repr(e).startswith('<EagerResult:')
            f = self.raising.apply()
        assert f.ready()
        assert not f.successful()
        assert f.traceback
        with pytest.raises(KeyError):
          f.get()

t/unit/tasks/test_tasks.py:1322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <EagerResult: 379e6181-84ef-4e28-9044-424612e3dcd2>, timeout = None
propagate = True, disable_sync_subtasks = True, kwargs = {}

    def get(self, timeout=None, propagate=True,
            disable_sync_subtasks=True, **kwargs):
        if disable_sync_subtasks:
            assert_will_not_block()
            if self.successful():
            return self.result
        elif self.state in states.PROPAGATE_STATES:
            if propagate:
              raise self.result if isinstance(
                    self.result, Exception) else Exception(self.result)
E               billiard.einfo.ExceptionWithTraceback: E               """
E               Traceback (most recent call last):
E File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 451, in trace_task
E                   R = retval = fun(*args, **kwargs)
E File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/tasks/test_tasks.py", line 65, in raising
E                   raise KeyError('foo')
E               KeyError: 'foo'
E               """

celery/result.py:1005: ExceptionWithTraceback
------------------------------ Captured log call ------------------------------- ERROR celery.app.trace:trace.py:265 Task t.unit.tasks.test_tasks.raising[379e6181-84ef-4e28-9044-424612e3dcd2] raised unexpected: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/tasks/test_tasks.py", line 65, in raising
    raise KeyError('foo')
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/tasks/test_tasks.py", line 65, in raising
    raise KeyError('foo')
KeyError: 'foo'
"""
____________________ test_ExceptionInfo.test_exception_info ____________________

self = <t.unit.utils.test_collections.test_ExceptionInfo object at 0x7fbc3ed2ef20>

    def test_exception_info(self):
            try:
          raise LookupError('The quick brown fox jumps...')
E           LookupError: The quick brown fox jumps...

t/unit/utils/test_collections.py:145: LookupError

During handling of the above exception, another exception occurred:

self = <t.unit.utils.test_collections.test_ExceptionInfo object at 0x7fbc3ed2ef20>

    def test_exception_info(self):
            try:
            raise LookupError('The quick brown fox jumps...')
        except Exception:
            einfo = ExceptionInfo()
            assert str(einfo) == einfo.traceback
          assert isinstance(einfo.exception, LookupError)
E           assert False
E + where False = isinstance(ExceptionWithTraceback(), LookupError) E + where ExceptionWithTraceback() = <ExceptionInfo: ExceptionWithTraceback()>.exception

t/unit/utils/test_collections.py:149: AssertionError
__________________ test_trace_task.test_execute_jail_failure ___________________

self = <t.unit.worker.test_request.test_trace_task object at 0x7fbc3ee02860>

    def test_execute_jail_failure(self):
        ret = jail(
            self.app, uuid(), self.mytask_raising.name, {}, [4], {},
        )
        assert isinstance(ret, ExceptionInfo)
      assert ret.exception.args == (4,)
E       assert () == (4,)
E         Right contains one more item: 4
E         Use -v to get more diff

t/unit/worker/test_request.py:161: AssertionError
------------------------------ Captured log call ------------------------------- ERROR celery.app.trace:trace.py:265 Task t.unit.worker.test_request.mytask_raising[b44269f1-0484-4150-bdd5-66a42bb9de25] raised unexpected: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 49, in mytask_raising
    raise KeyError(i)
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 49, in mytask_raising
    raise KeyError(i)
KeyError: 4
"""
___________________ test_Request.test_on_failure_Terminated ____________________

self = <t.unit.worker.test_request.test_Request object at 0x7fbc3f1ba320>

    def test_on_failure_Terminated(self):
        einfo = None
        try:
            raise Terminated('9')
        except Terminated:
            einfo = ExceptionInfo()
        assert einfo is not None
        req = self.get_request(self.add.s(2, 2))
        req.on_failure(einfo)
      req.eventer.send.assert_called_with(
            'task-revoked',
            uuid=req.id, terminated=True, signum='9', expired=False,
        )

t/unit/worker/test_request.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Mock name='eventer.send' id='140446321570576'>, args = ('task-revoked',) kwargs = {'expired': False, 'signum': '9', 'terminated': True, 'uuid': '423ffeb0-42d8-4df7-9973-9c9a92a5e6ad'} expected = call('task-revoked', uuid='423ffeb0-42d8-4df7-9973-9c9a92a5e6ad', terminated=True, signum='9', expired=False) actual = call('task-failed', uuid='423ffeb0-42d8-4df7-9973-9c9a92a5e6ad', exception='ExceptionWithTraceback()', traceback='Trac...equest.py", line 280, in test_on_failure_Terminated\n raise Terminated(\'9\')\nbilliard.exceptions.Terminated: 9\n') _error_message = <function NonCallableMock.assert_called_with.<locals>._error_message at 0x7fbc351c77f0>
cause = None

    def assert_called_with(self, /, *args, **kwargs):
        """assert that the last call was made with the specified arguments.
Raises an AssertionError if the args and keyword args passed in are
        different to the last call to the mock."""
        if self.call_args is None:
            expected = self._format_mock_call_signature(args, kwargs)
            actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\nActual: %s'
                    % (expected, actual))
            raise AssertionError(error_message)
            def _error_message():
            msg = self._format_mock_failure_message(args, kwargs)
            return msg
        expected = self._call_matcher(_Call((args, kwargs), two=True))
        actual = self._call_matcher(self.call_args)
        if actual != expected:
            cause = expected if isinstance(expected, Exception) else None
          raise AssertionError(_error_message()) from cause
E           AssertionError: expected call not found.
E Expected: send('task-revoked', uuid='423ffeb0-42d8-4df7-9973-9c9a92a5e6ad', terminated=True, signum='9', expired=False) E Actual: send('task-failed', uuid='423ffeb0-42d8-4df7-9973-9c9a92a5e6ad', exception='ExceptionWithTraceback()', traceback='Traceback (most recent call last):\n File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 280, in test_on_failure_Terminated\n raise Terminated(\'9\')\nbilliard.exceptions.Terminated: 9\n')

/usr/lib/python3.10/unittest/mock.py:919: AssertionError
------------------------------ Captured log call ------------------------------- ERROR celery.worker.request:request.py:596 Task handler raised error: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 280, in test_on_failure_Terminated
    raise Terminated('9')
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 280, in test_on_failure_Terminated
    raise Terminated('9')
billiard.exceptions.Terminated: 9
"""
_____________ test_Request.test_on_failure_propagates_MemoryError ______________

self = <t.unit.worker.test_request.test_Request object at 0x7fbc3f1b8b50>

    def test_on_failure_propagates_MemoryError(self):
        einfo = None
        try:
            raise MemoryError()
        except MemoryError:
            einfo = ExceptionInfo(internal=True)
        assert einfo is not None
        req = self.get_request(self.add.s(2, 2))
      with pytest.raises(MemoryError):
E       Failed: DID NOT RAISE <class 'MemoryError'>

t/unit/worker/test_request.py:299: Failed
------------------------------ Captured log call ------------------------------- ERROR celery.worker.request:request.py:596 Task handler raised error: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 294, in test_on_failure_propagates_MemoryError
    raise MemoryError()
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 294, in test_on_failure_propagates_MemoryError
    raise MemoryError()
MemoryError
"""
_______________ test_Request.test_on_failure_Ignore_acknowledges _______________

self = <t.unit.worker.test_request.test_Request object at 0x7fbc3f1b8790>

    def test_on_failure_Ignore_acknowledges(self):
        einfo = None
        try:
            raise Ignore()
        except Ignore:
            einfo = ExceptionInfo(internal=True)
        assert einfo is not None
        req = self.get_request(self.add.s(2, 2))
        req.on_failure(einfo)
      req.on_ack.assert_called_with(req_logger, req.connection_errors)

t/unit/worker/test_request.py:311: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Mock name='on_ack' id='140446322444320'>
args = (<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,))
kwargs = {}
expected = "on_ack(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,))"
actual = 'not called.'
error_message = "expected call not found.\nExpected: on_ack(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,))\nActual: not called."

    def assert_called_with(self, /, *args, **kwargs):
        """assert that the last call was made with the specified arguments.
Raises an AssertionError if the args and keyword args passed in are
        different to the last call to the mock."""
        if self.call_args is None:
            expected = self._format_mock_call_signature(args, kwargs)
            actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\nActual: %s'
                    % (expected, actual))
          raise AssertionError(error_message)
E           AssertionError: expected call not found.
E Expected: on_ack(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,))
E           Actual: not called.

/usr/lib/python3.10/unittest/mock.py:910: AssertionError
------------------------------ Captured log call ------------------------------- ERROR celery.worker.request:request.py:596 Task handler raised error: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 305, in test_on_failure_Ignore_acknowledges
    raise Ignore()
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 305, in test_on_failure_Ignore_acknowledges
    raise Ignore()
celery.exceptions.Ignore
"""
_________________ test_Request.test_on_failure_Reject_rejects __________________

self = <t.unit.worker.test_request.test_Request object at 0x7fbc3f1b8250>

    def test_on_failure_Reject_rejects(self):
        einfo = None
        try:
            raise Reject()
        except Reject:
            einfo = ExceptionInfo(internal=True)
        assert einfo is not None
        req = self.get_request(self.add.s(2, 2))
        req.on_failure(einfo)
      req.on_reject.assert_called_with(
            req_logger, req.connection_errors, False,
        )

t/unit/worker/test_request.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Mock name='on_reject' id='140446319021744'>
args = (<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), False)
kwargs = {}
expected = "on_reject(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), False)"
actual = 'not called.'
error_message = "expected call not found.\nExpected: on_reject(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), False)\nActual: not called."

    def assert_called_with(self, /, *args, **kwargs):
        """assert that the last call was made with the specified arguments.
Raises an AssertionError if the args and keyword args passed in are
        different to the last call to the mock."""
        if self.call_args is None:
            expected = self._format_mock_call_signature(args, kwargs)
            actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\nActual: %s'
                    % (expected, actual))
          raise AssertionError(error_message)
E           AssertionError: expected call not found.
E Expected: on_reject(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), False)
E           Actual: not called.

/usr/lib/python3.10/unittest/mock.py:910: AssertionError
------------------------------ Captured log call ------------------------------- ERROR celery.worker.request:request.py:596 Task handler raised error: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 316, in test_on_failure_Reject_rejects
    raise Reject()
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 316, in test_on_failure_Reject_rejects
    raise Reject()
celery.exceptions.Reject: (None, False)
"""
___________ test_Request.test_on_failure_Reject_rejects_with_requeue ___________

self = <t.unit.worker.test_request.test_Request object at 0x7fbc3ee01360>

    def test_on_failure_Reject_rejects_with_requeue(self):
        einfo = None
        try:
            raise Reject(requeue=True)
        except Reject:
            einfo = ExceptionInfo(internal=True)
        assert einfo is not None
        req = self.get_request(self.add.s(2, 2))
        req.on_failure(einfo)
      req.on_reject.assert_called_with(
            req_logger, req.connection_errors, True,
        )

t/unit/worker/test_request.py:335: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Mock name='on_reject' id='140446327419136'>
args = (<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), True)
kwargs = {}
expected = "on_reject(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), True)"
actual = 'not called.'
error_message = "expected call not found.\nExpected: on_reject(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), True)\nActual: not called."

    def assert_called_with(self, /, *args, **kwargs):
        """assert that the last call was made with the specified arguments.
Raises an AssertionError if the args and keyword args passed in are
        different to the last call to the mock."""
        if self.call_args is None:
            expected = self._format_mock_call_signature(args, kwargs)
            actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\nActual: %s'
                    % (expected, actual))
          raise AssertionError(error_message)
E           AssertionError: expected call not found.
E Expected: on_reject(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), True)
E           Actual: not called.

/usr/lib/python3.10/unittest/mock.py:910: AssertionError
------------------------------ Captured log call ------------------------------- ERROR celery.worker.request:request.py:596 Task handler raised error: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 329, in test_on_failure_Reject_rejects_with_requeue
    raise Reject(requeue=True)
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 329, in test_on_failure_Reject_rejects_with_requeue
    raise Reject(requeue=True)
celery.exceptions.Reject: (None, True)
"""
______ test_Request.test_on_failure_WorkerLostError_rejects_with_requeue _______

self = <t.unit.worker.test_request.test_Request object at 0x7fbc3ee02530>

    def test_on_failure_WorkerLostError_rejects_with_requeue(self):
        try:
            raise WorkerLostError()
        except WorkerLostError:
            einfo = ExceptionInfo(internal=True)
            req = self.get_request(self.add.s(2, 2))
        req.task.acks_late = True
        req.task.reject_on_worker_lost = True
        req.delivery_info['redelivered'] = False
        req.task.backend = Mock()
            req.on_failure(einfo)
    >       req.on_reject.assert_called_with(
            req_logger, req.connection_errors, True)

t/unit/worker/test_request.py:353: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Mock name='on_reject' id='140446322289936'>
args = (<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), True)
kwargs = {}
expected = "on_reject(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), True)"
actual = 'not called.'
error_message = "expected call not found.\nExpected: on_reject(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), True)\nActual: not called."

    def assert_called_with(self, /, *args, **kwargs):
        """assert that the last call was made with the specified arguments.
Raises an AssertionError if the args and keyword args passed in are
        different to the last call to the mock."""
        if self.call_args is None:
            expected = self._format_mock_call_signature(args, kwargs)
            actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\nActual: %s'
                    % (expected, actual))
          raise AssertionError(error_message)
E           AssertionError: expected call not found.
E Expected: on_reject(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), True)
E           Actual: not called.

/usr/lib/python3.10/unittest/mock.py:910: AssertionError
------------------------------ Captured log call ------------------------------- ERROR celery.worker.request:request.py:596 Task handler raised error: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 341, in test_on_failure_WorkerLostError_rejects_with_requeue
    raise WorkerLostError()
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 341, in test_on_failure_WorkerLostError_rejects_with_requeue
    raise WorkerLostError()
billiard.exceptions.WorkerLostError
"""
________ test_Request.test_on_failure_WorkerLostError_redelivered_None _________

self = <t.unit.worker.test_request.test_Request object at 0x7fbc3ed53a30>

    def test_on_failure_WorkerLostError_redelivered_None(self):
        try:
            raise WorkerLostError()
        except WorkerLostError:
            einfo = ExceptionInfo(internal=True)
            req = self.get_request(self.add.s(2, 2))
        req.task.acks_late = True
        req.task.reject_on_worker_lost = True
        req.delivery_info['redelivered'] = None
        req.task.backend = Mock()
            req.on_failure(einfo)
    >       req.on_reject.assert_called_with(
            req_logger, req.connection_errors, True)

t/unit/worker/test_request.py:371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Mock name='on_reject' id='140446322210704'>
args = (<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), True)
kwargs = {}
expected = "on_reject(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), True)"
actual = 'not called.'
error_message = "expected call not found.\nExpected: on_reject(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), True)\nActual: not called."

    def assert_called_with(self, /, *args, **kwargs):
        """assert that the last call was made with the specified arguments.
Raises an AssertionError if the args and keyword args passed in are
        different to the last call to the mock."""
        if self.call_args is None:
            expected = self._format_mock_call_signature(args, kwargs)
            actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\nActual: %s'
                    % (expected, actual))
          raise AssertionError(error_message)
E           AssertionError: expected call not found.
E Expected: on_reject(<Logger celery.worker.request (WARNING)>, (<class 'OSError'>,), True)
E           Actual: not called.

/usr/lib/python3.10/unittest/mock.py:910: AssertionError
------------------------------ Captured log call ------------------------------- ERROR celery.worker.request:request.py:596 Task handler raised error: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 359, in test_on_failure_WorkerLostError_redelivered_None
    raise WorkerLostError()
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 359, in test_on_failure_WorkerLostError_redelivered_None
    raise WorkerLostError()
billiard.exceptions.WorkerLostError
"""
__________________________ test_Request.test_on_retry __________________________

self = <t.unit.worker.test_request.test_Request object at 0x7fbc3f240340>

    def test_on_retry(self):
        job = self.get_request(self.mytask.s(1, f='x'))
        job.eventer = Mock(name='.eventer')
        try:
            raise Retry('foo', KeyError('moofoobar'))
        except Retry:
            einfo = ExceptionInfo()
            job.on_failure(einfo)
          job.eventer.send.assert_called_with(
                'task-retried',
                uuid=job.id,
                exception=safe_repr(einfo.exception.exc),
                traceback=safe_str(einfo.traceback),
            )

t/unit/worker/test_request.py:442: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Mock name='.eventer.send' id='140446324140416'>
args = ('task-retried',)
kwargs = {'exception': "Retry(Retry(...), KeyError('moofoobar'), None)", 'traceback': 'Traceback (most recent call last):\n Fi...try(\'foo\', KeyError(\'moofoobar\'))\ncelery.exceptions.Retry: foo\n', 'uuid': 'c3e5da60-af8c-43c4-b6be-0c55cc0e1f00'} expected = call('task-retried', uuid='c3e5da60-af8c-43c4-b6be-0c55cc0e1f00', exception="Retry(Retry(...), KeyError('moofoobar'), ...st.py", line 438, in test_on_retry\n raise Retry(\'foo\', KeyError(\'moofoobar\'))\ncelery.exceptions.Retry: foo\n') actual = call('task-failed', uuid='c3e5da60-af8c-43c4-b6be-0c55cc0e1f00', exception='ExceptionWithTraceback()', traceback='Trac...st.py", line 438, in test_on_retry\n raise Retry(\'foo\', KeyError(\'moofoobar\'))\ncelery.exceptions.Retry: foo\n') _error_message = <function NonCallableMock.assert_called_with.<locals>._error_message at 0x7fbc34fd3c70>
cause = None

    def assert_called_with(self, /, *args, **kwargs):
        """assert that the last call was made with the specified arguments.
Raises an AssertionError if the args and keyword args passed in are
        different to the last call to the mock."""
        if self.call_args is None:
            expected = self._format_mock_call_signature(args, kwargs)
            actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\nActual: %s'
                    % (expected, actual))
            raise AssertionError(error_message)
            def _error_message():
            msg = self._format_mock_failure_message(args, kwargs)
            return msg
        expected = self._call_matcher(_Call((args, kwargs), two=True))
        actual = self._call_matcher(self.call_args)
        if actual != expected:
            cause = expected if isinstance(expected, Exception) else None
          raise AssertionError(_error_message()) from cause
E           AssertionError: expected call not found.
E Expected: send('task-retried', uuid='c3e5da60-af8c-43c4-b6be-0c55cc0e1f00', exception="Retry(Retry(...), KeyError('moofoobar'), None)", traceback='Traceback (most recent call last):\n File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 438, in test_on_retry\n raise Retry(\'foo\', KeyError(\'moofoobar\'))\ncelery.exceptions.Retry: foo\n') E Actual: send('task-failed', uuid='c3e5da60-af8c-43c4-b6be-0c55cc0e1f00', exception='ExceptionWithTraceback()', traceback='Traceback (most recent call last):\n File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 438, in test_on_retry\n raise Retry(\'foo\', KeyError(\'moofoobar\'))\ncelery.exceptions.Retry: foo\n')

/usr/lib/python3.10/unittest/mock.py:919: AssertionError
------------------------------ Captured log call ------------------------------- ERROR celery.worker.request:request.py:596 Task handler raised error: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 438, in test_on_retry
    raise Retry('foo', KeyError('moofoobar'))
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 438, in test_on_retry
    raise Retry('foo', KeyError('moofoobar'))
celery.exceptions.Retry: foo
"""
__________________ test_Request.test_on_success_BaseException __________________

self = <t.unit.worker.test_request.test_Request object at 0x7fbc3f1c0190>

    def test_on_success_BaseException(self):
        job = self.xRequest()
        job.time_start = 1
      with pytest.raises(SystemExit):
E       Failed: DID NOT RAISE <class 'SystemExit'>

t/unit/worker/test_request.py:653: Failed
_____ test_Request.test_on_failure_acks_late_reject_on_worker_lost_enabled _____

self = <t.unit.worker.test_request.test_Request object at 0x7fbc3f1c16c0>

    def test_on_failure_acks_late_reject_on_worker_lost_enabled(self):
        try:
            raise WorkerLostError()
        except WorkerLostError:
            exc_info = ExceptionInfo()
        self.mytask.acks_late = True
        self.mytask.reject_on_worker_lost = True
            job = self.xRequest()
        job.delivery_info['redelivered'] = False
        job.on_failure(exc_info)
    >       assert self.mytask.backend.get_status(job.id) == states.PENDING
E       AssertionError: assert 'FAILURE' == 'PENDING'
E         - PENDING
E         + FAILURE

t/unit/worker/test_request.py:718: AssertionError
------------------------------ Captured log call ------------------------------- ERROR celery.worker.request:request.py:596 Task handler raised error: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 708, in test_on_failure_acks_late_reject_on_worker_lost_enabled
    raise WorkerLostError()
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 708, in test_on_failure_acks_late_reject_on_worker_lost_enabled
    raise WorkerLostError()
billiard.exceptions.WorkerLostError
"""
_________________ test_Request.test_on_failure_task_cancelled __________________

self = <t.unit.worker.test_request.test_Request object at 0x7fbc3f1c1300>

    def test_on_failure_task_cancelled(self):
        job = self.xRequest()
        job.eventer = Mock()
        job.time_start = 1
        job._already_cancelled = True
            try:
            raise Terminated()
        except Terminated:
            exc_info = ExceptionInfo()
                job.on_failure(exc_info)
            job.on_failure(exc_info)
      assert not job.eventer.send.called
E       AssertionError: assert not True
E        +  where True = <Mock name='mock.send' id='140446314140608'>.called
E + where <Mock name='mock.send' id='140446314140608'> = <Mock id='140446320526864'>.send E + where <Mock id='140446320526864'> = <Request: t.unit.worker.test_request.mytask[69befeb8-e593-4c90-a013-2a946b84933e] >.eventer

t/unit/worker/test_request.py:807: AssertionError
------------------------------ Captured log call ------------------------------- ERROR celery.worker.request:request.py:596 Task handler raised error: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 800, in test_on_failure_task_cancelled
    raise Terminated()
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 800, in test_on_failure_task_cancelled
    raise Terminated()
billiard.exceptions.Terminated
"""
ERROR celery.worker.request:request.py:596 Task handler raised error: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 800, in test_on_failure_task_cancelled
    raise Terminated()
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 800, in test_on_failure_task_cancelled
    raise Terminated()
billiard.exceptions.Terminated
"""
________________ test_Request.test_from_message_invalid_kwargs _________________

self = <t.unit.worker.test_request.test_Request object at 0x7fbc3f2e6ef0>

    def test_from_message_invalid_kwargs(self):
        m = self.TaskMessage(self.mytask.name, args=(), kwargs='foo')
        req = Request(m, app=self.app)
        with pytest.raises(InvalidTaskError):
          raise req.execute().exception
E           billiard.einfo.ExceptionWithTraceback: E           """
E           Traceback (most recent call last):
E File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 401, in trace_task
E               kwargs.items
E           AttributeError: 'str' object has no attribute 'items'
E E During handling of the above exception, another exception occurred:
E           E           Traceback (most recent call last):
E File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 403, in trace_task
E               raise InvalidTaskError(
E celery.exceptions.InvalidTaskError: Task keyword arguments is not a mapping
E           """

t/unit/worker/test_request.py:813: ExceptionWithTraceback
________________ test_Request.test_on_failure__WorkerLostError _________________

self = <t.unit.worker.test_request.test_Request object at 0x7fbc3f2944c0>

    def test_on_failure__WorkerLostError(self):
        exc = WorkerLostError()
        job = self._test_on_failure(exc)
      job.task.backend.mark_as_failure.assert_called_with(
            job.id, exc, request=job._context, store_result=True,
        )

t/unit/worker/test_request.py:1147: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Mock name='mark_as_failure' id='140446314679792'>
args = ('882018d5-e647-418a-85d6-be397be1f32f', WorkerLostError())
kwargs = {'request': <Context: {'id': '882018d5-e647-418a-85d6-be397be1f32f', 'task': 't.unit.worker.test_request.mytask', 'sha...8976'>}, 'args': [4], 'kwargs': {'f': 'x'}, 'callbacks': None, 'errbacks': None, 'chain': None}>, 'store_result': True} expected = call('882018d5-e647-418a-85d6-be397be1f32f', WorkerLostError(), request=<Context: {'id': '882018d5-e647-418a-85d6-be39...4678976'>}, 'args': [4], 'kwargs': {'f': 'x'}, 'callbacks': None, 'errbacks': None, 'chain': None}>, store_result=True) actual = call('882018d5-e647-418a-85d6-be397be1f32f', ExceptionWithTraceback(), request=<Context: {'id': '882018d5-e647-418a-85...4678976'>}, 'args': [4], 'kwargs': {'f': 'x'}, 'callbacks': None, 'errbacks': None, 'chain': None}>, store_result=True) _error_message = <function NonCallableMock.assert_called_with.<locals>._error_message at 0x7fbc34cb2b00>
cause = None

    def assert_called_with(self, /, *args, **kwargs):
        """assert that the last call was made with the specified arguments.
Raises an AssertionError if the args and keyword args passed in are
        different to the last call to the mock."""
        if self.call_args is None:
            expected = self._format_mock_call_signature(args, kwargs)
            actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\nActual: %s'
                    % (expected, actual))
            raise AssertionError(error_message)
            def _error_message():
            msg = self._format_mock_failure_message(args, kwargs)
            return msg
        expected = self._call_matcher(_Call((args, kwargs), two=True))
        actual = self._call_matcher(self.call_args)
        if actual != expected:
            cause = expected if isinstance(expected, Exception) else None
          raise AssertionError(_error_message()) from cause
E           AssertionError: expected call not found.
E Expected: mark_as_failure('882018d5-e647-418a-85d6-be397be1f32f', WorkerLostError(), request=<Context: {'id': '882018d5-e647-418a-85d6-be397be1f32f', 'task': 't.unit.worker.test_request.mytask', 'shadow': None, 'properties': <Mock name='TaskMessage-882018d5-e647-418a-85d6-be397be1f32f.properties' id='140446314679168'>, 'reply_to': <Mock name='TaskMessage-882018d5-e647-418a-85d6-be397be1f32f.properties.get()' id='140446314677104'>, 'correlation_id': <Mock name='TaskMessage-882018d5-e647-418a-85d6-be397be1f32f.properties.get()' id='140446314677104'>, 'hostname': 'ci-274-b87ccd28', 'delivery_info': {'exchange': <Mock name='TaskMessage-882018d5-e647-418a-85d6-be397be1f32f.delivery_info.get()' id='140446314678976'>, 'routing_key': <Mock name='TaskMessage-882018d5-e647-418a-85d6-be397be1f32f.delivery_info.get()' id='140446314678976'>, 'priority': <Mock name='TaskMessage-882018d5-e647-418a-85d6-be397be1f32f.properties.get()' id='140446314677104'>, 'redelivered': <Mock name='TaskMessage-882018d5-e647-418a-85d6-be397be1f32f.delivery_info.get()' id='140446314678976'>}, 'args': [4], 'kwargs': {'f': 'x'}, 'callbacks': None, 'errbacks': None, 'chain': None}>, store_result=True) E Actual: mark_as_failure('882018d5-e647-418a-85d6-be397be1f32f', ExceptionWithTraceback(), request=<Context: {'id': '882018d5-e647-418a-85d6-be397be1f32f', 'task': 't.unit.worker.test_request.mytask', 'shadow': None, 'properties': <Mock name='TaskMessage-882018d5-e647-418a-85d6-be397be1f32f.properties' id='140446314679168'>, 'reply_to': <Mock name='TaskMessage-882018d5-e647-418a-85d6-be397be1f32f.properties.get()' id='140446314677104'>, 'correlation_id': <Mock name='TaskMessage-882018d5-e647-418a-85d6-be397be1f32f.properties.get()' id='140446314677104'>, 'hostname': 'ci-274-b87ccd28', 'delivery_info': {'exchange': <Mock name='TaskMessage-882018d5-e647-418a-85d6-be397be1f32f.delivery_info.get()' id='140446314678976'>, 'routing_key': <Mock name='TaskMessage-882018d5-e647-418a-85d6-be397be1f32f.delivery_info.get()' id='140446314678976'>, 'priority': <Mock name='TaskMessage-882018d5-e647-418a-85d6-be397be1f32f.properties.get()' id='140446314677104'>, 'redelivered': <Mock name='TaskMessage-882018d5-e647-418a-85d6-be397be1f32f.delivery_info.get()' id='140446314678976'>}, 'args': [4], 'kwargs': {'f': 'x'}, 'callbacks': None, 'errbacks': None, 'chain': None}>, store_result=True)

/usr/lib/python3.10/unittest/mock.py:919: AssertionError
------------------------------ Captured log call ------------------------------- ERROR celery.worker.request:request.py:596 Task handler raised error: ExceptionWithTraceback()
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 1127, in _test_on_failure
    raise exception
billiard.einfo.ExceptionWithTraceback: """
Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/t/unit/worker/test_request.py", line 1127, in _test_on_failure
    raise exception
billiard.exceptions.WorkerLostError
"""
____________ test_create_request_class.test_on_success__SystemExit _____________

self = <t.unit.worker.test_request.test_create_request_class object at 0x7fbc3f295750>
errors = (<class 'SystemExit'>, <class 'KeyboardInterrupt'>)

    def test_on_success__SystemExit(self,
errors=(SystemExit, KeyboardInterrupt)):
        for exc in errors:
            einfo = None
            try:
                raise exc()
            except exc:
                einfo = ExceptionInfo()
          with pytest.raises(exc):
E           Failed: DID NOT RAISE <class 'SystemExit'>

t/unit/worker/test_request.py:1210: Failed
=============================== warnings summary ===============================
../../../../../usr/lib/python3/dist-packages/kombu/utils/compat.py:82
../../../../../usr/lib/python3/dist-packages/kombu/utils/compat.py:82
/usr/lib/python3/dist-packages/kombu/utils/compat.py:82: DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.
    for ep in importlib_metadata.entry_points().get(namespace, [])

../../../../../usr/lib/python3/dist-packages/_pytest/config/__init__.py:1252
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1252: PytestConfigWarning: Unknown config option: xdfail_strict
      self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

../../../../../usr/lib/python3/dist-packages/botocore/httpsession.py:41
/usr/lib/python3/dist-packages/botocore/httpsession.py:41: DeprecationWarning: 'urllib3.contrib.pyopenssl' module is deprecated and will be removed in a future release of urllib3 2.x. Read more in this issue: https://github.com/urllib3/urllib3/issues/2680 from urllib3.contrib.pyopenssl import orig_util_SSLContext as SSLContext

celery/utils/imports.py:145: 1 warning
t/unit/test_canvas.py: 2 warnings
t/unit/app/test_app.py: 6 warnings
t/unit/app/test_backends.py: 8 warnings
t/unit/app/test_beat.py: 56 warnings
t/unit/app/test_builtins.py: 7 warnings
t/unit/app/test_control.py: 2 warnings
t/unit/app/test_routes.py: 2 warnings
t/unit/backends/test_cache.py: 2 warnings
t/unit/backends/test_dynamodb.py: 25 warnings
t/unit/backends/test_mongodb.py: 7 warnings
t/unit/backends/test_redis.py: 1 warning
t/unit/contrib/test_abortable.py: 4 warnings
t/unit/tasks/test_canvas.py: 39 warnings
t/unit/tasks/test_chord.py: 9 warnings
t/unit/tasks/test_result.py: 94 warnings
t/unit/tasks/test_tasks.py: 22 warnings
t/unit/tasks/test_trace.py: 21 warnings
t/unit/utils/test_graph.py: 9 warnings
t/unit/worker/test_loops.py: 6 warnings
t/unit/worker/test_request.py: 65 warnings
t/unit/worker/test_strategy.py: 53 warnings
t/unit/worker/test_worker.py: 4 warnings

/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/utils/imports.py:145: DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.
    for ep in entry_points().get(namespace, []):

t/unit/app/test_app.py::test_App::test_worker_main

/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/bin/celery.py:78: DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.
    @with_plugins(entry_points().get('celery.commands', []))

t/unit/tasks/test_trace.py::test_trace::test_backend_error_should_report_failure
t/unit/worker/test_request.py::test_Request::test_execute_backend_error_acks_late

/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py:660: RuntimeWarning: Exception raised outside body: Exception():
  Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 518, in trace_task
      task.backend.mark_as_done(
    File "/usr/lib/python3.10/unittest/mock.py", line 1104, in __call__
      return self._mock_call(*args, **kwargs)
    File "/usr/lib/python3.10/unittest/mock.py", line 1108, in _mock_call
      return self._execute_mock_call(*args, **kwargs)
File "/usr/lib/python3.10/unittest/mock.py", line 1163, in _execute_mock_call
      raise effect
  Exception
      warn(RuntimeWarning(

t/unit/tasks/test_trace.py::test_trace::test_backend_error_should_report_failure
t/unit/worker/test_request.py::test_Request::test_execute_backend_error_acks_late

/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py:660: RuntimeWarning: Exception raised outside body: Exception():
  Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 518, in trace_task
      task.backend.mark_as_done(
    File "/usr/lib/python3.10/unittest/mock.py", line 1104, in __call__
      return self._mock_call(*args, **kwargs)
    File "/usr/lib/python3.10/unittest/mock.py", line 1108, in _mock_call
      return self._execute_mock_call(*args, **kwargs)
File "/usr/lib/python3.10/unittest/mock.py", line 1163, in _execute_mock_call
      raise effect
  Exception
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 584, in trace_task
      return task.__trace__(uuid, args, kwargs, request)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 572, in trace_task
      I, _, _, _ = on_error(task_request, exc, uuid)
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 379, in on_error
      R = I.handle_error_state(
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 178, in handle_error_state
      return {
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 225, in handle_failure
      task.backend.mark_as_failure(
    File "/usr/lib/python3.10/unittest/mock.py", line 1104, in __call__
      return self._mock_call(*args, **kwargs)
    File "/usr/lib/python3.10/unittest/mock.py", line 1108, in _mock_call
      return self._execute_mock_call(*args, **kwargs)
File "/usr/lib/python3.10/unittest/mock.py", line 1163, in _execute_mock_call
      raise effect
  Exception
      warn(RuntimeWarning(

t/unit/worker/test_consumer.py::test_Consumer::test_collects_at_restart
t/unit/worker/test_worker.py::test_Consumer::test_start_connection_error

/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/worker/consumer/consumer.py:367: CPendingDeprecationWarning: In Celery 5.1 we introduced an optional breaking change which on connection loss cancels all currently executed tasks with late acknowledgement enabled. These tasks cannot be acknowledged as the connection is gone, and the tasks are automatically redelivered back to the queue. You can enable this behavior using the worker_cancel_long_running_tasks_on_connection_loss setting. In Celery 5.1 it is set to False by default. The setting will be set to True by default in Celery 6.0.
      warnings.warn(CANCEL_TASKS_BY_DEFAULT, CPendingDeprecationWarning)

t/unit/worker/test_request.py::test_Request::test_from_message_invalid_kwargs

/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py:660: RuntimeWarning: Exception raised outside body: InvalidTaskError('Task keyword arguments is not a mapping'):
  Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 401, in trace_task
      kwargs.items
  AttributeError: 'str' object has no attribute 'items'
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
File "/tmp/autopkgtest-lxc.fu6f9zq_/downtmp/build.87O/src/celery/app/trace.py", line 403, in trace_task
      raise InvalidTaskError(
celery.exceptions.InvalidTaskError: Task keyword arguments is not a mapping
      warn(RuntimeWarning(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================ FAILED t/unit/tasks/test_result.py::test_EagerResult::test_wait_raises - bill... FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_retry - assert 1 == 4 FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_retry_no_args - as... FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_raise_without_throw_eager FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_return_with_throw_eager FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_eager_retry_with_single_new_params FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_eager_retry_with_new_params FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_eager_retry_with_autoretry_for_exception FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_retry_task_max_retries_override FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_retry_task_explicit_exception FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_retry_eager_should_return_value
FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_retry_with_kwargs
FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_retry_with_custom_exception FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_max_retries_exceeded FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_max_retries_exceeded_task_args FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_autoretry_no_kwargs FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_autoretry - assert...
FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_autoretry_backoff
FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_autoretry_backoff_jitter FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_autoretry_for_from_base FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_override_autoretry_for_from_base FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_retry_kwargs_from_base FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_override_retry_kwargs_from_base FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_retry_backoff_from_base FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_override_retry_backoff_from_base FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_retry_backoff_max_from_base FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_override_retry_backoff_max_from_base FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_retry_backoff_jitter_from_base FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_override_backoff_jitter_from_base FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_retry_wrong_eta_when_not_enable_utc FAILED t/unit/tasks/test_tasks.py::test_task_retries::test_autoretry_class_based_task FAILED t/unit/tasks/test_tasks.py::test_apply_task::test_apply - billiard.ein... FAILED t/unit/utils/test_collections.py::test_ExceptionInfo::test_exception_info FAILED t/unit/worker/test_request.py::test_trace_task::test_execute_jail_failure FAILED t/unit/worker/test_request.py::test_Request::test_on_failure_Terminated FAILED t/unit/worker/test_request.py::test_Request::test_on_failure_propagates_MemoryError FAILED t/unit/worker/test_request.py::test_Request::test_on_failure_Ignore_acknowledges FAILED t/unit/worker/test_request.py::test_Request::test_on_failure_Reject_rejects FAILED t/unit/worker/test_request.py::test_Request::test_on_failure_Reject_rejects_with_requeue FAILED t/unit/worker/test_request.py::test_Request::test_on_failure_WorkerLostError_rejects_with_requeue FAILED t/unit/worker/test_request.py::test_Request::test_on_failure_WorkerLostError_redelivered_None FAILED t/unit/worker/test_request.py::test_Request::test_on_retry - Assertion... FAILED t/unit/worker/test_request.py::test_Request::test_on_success_BaseException FAILED t/unit/worker/test_request.py::test_Request::test_on_failure_acks_late_reject_on_worker_lost_enabled FAILED t/unit/worker/test_request.py::test_Request::test_on_failure_task_cancelled FAILED t/unit/worker/test_request.py::test_Request::test_from_message_invalid_kwargs FAILED t/unit/worker/test_request.py::test_Request::test_on_failure__WorkerLostError FAILED t/unit/worker/test_request.py::test_create_request_class::test_on_success__SystemExit = 48 failed, 2296 passed, 28 skipped, 8 deselected, 3 xfailed, 457 warnings, 20 subtests passed in 59.98s =
autopkgtest [11:11:19]: test upstream

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to