============================= test session starts ============================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 rootdir: /home/runner/work/Openfire/Openfire/aioxmpp plugins: cov-3.0.0 collected 4533 items / 4 deselected / 4529 selected tests/test_cache.py ssssssssssssss [ 0%] tests/test_callbacks.py ssssssssssssssssssssssssssssssssssssssssssssssss [ 1%] ssssssssssssssssssssssssssssssssssssssssss [ 2%] tests/test_connector.py sssssssssssssss [ 2%] tests/test_custom_queue.py ssssssssss [ 2%] tests/test_dispatcher.py sssssssssssssssssssssssssssssssssssssssssssssss [ 3%] sss [ 3%] tests/test_e2e.py ...ss.. [ 4%] tests/test_errors.py ssssssssssssssssssssss [ 4%] tests/test_hashes.py ssssssssssssssssssssssssssssssssssssssssssssssssss [ 5%] tests/test_highlevel.py ssssss [ 5%] tests/test_i18n.py sssssssssssssssssssssssssssssssssssssssssssssssssss [ 6%] tests/test_network.py sssssssssssssssssssssssssssssssssssssssssss [ 7%] tests/test_node.py sssssssssssssssssssssssssssssssssssssssssssssssssssss [ 9%] sssssssssssssssssssssssssssssssssssssssssssssssss [ 10%] tests/test_nonza.py ssssssssssssssssssssssssssssssssssssssssssssssssssss [ 11%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 12%] tests/test_protocol.py sssssssssssssssssssssssssssssssssssssssssssssssss [ 13%] sssssssssssssssssssssssssssssssssssssssssssssssss [ 14%] tests/test_rfc3921.py sssssssssssss [ 15%] tests/test_rfc6120.py ssssssss [ 15%] tests/test_sasl.py ssssssssss [ 15%] tests/test_security_layer.py sssssssssssssssssssssssssssssssssssssssssss [ 16%] sssssssssssssssssssssssssssssssssssssss [ 17%] tests/test_service.py ssssssssssssssssssssssssssssssssssssssssssssssssss [ 18%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 19%] ssssssssssssssssssssssss [ 20%] tests/test_stanza.py sssssssssssssssssssssssssssssssssssssssssssssssssss [ 21%] sssssssssssssssssssssssssssssssssssssssssssssssss [ 22%] tests/test_statemachine.py sssssssssssss [ 22%] tests/test_stream.py sssssssssssssssssssssssssssssssssssssssssssssssssss [ 24%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 25%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 27%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 28%] s [ 28%] tests/test_stringprep.py sssssssssssssssss [ 29%] tests/test_structs.py ssssssssssssssssssssssssssssssssssssssssssssssssss [ 30%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 31%] ssss [ 32%] tests/test_tasks.py ssssssssss [ 32%] tests/test_testutils.py ssssssssssssssssssssssssssssssssssssssssssssssss [ 33%] ssssssssssssssssssssss [ 33%] tests/test_tracking.py ssssssssssssssssssssssssssssssssssssss [ 34%] tests/test_utils.py ssssssssssssssssssssssssssssssssssssssssssssssssssss [ 35%] sssssssss [ 35%] tests/test_xml.py ssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 37%] sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 38%] tests/test_xmltestutils.py sssssssssssssssss [ 39%] tests/adhoc/test_e2e.py .ss..... [ 39%] tests/adhoc/test_service.py sssssssssssssssssssssssssssssssssssssssssss [ 40%] tests/adhoc/test_xso.py sssssssssssssssssssssssssssssssss [ 40%] tests/avatar/test_e2e.py ss [ 41%] tests/avatar/test_service.py sssssssssssssssssssssssssssssssssssssssssss [ 41%] [ 41%] tests/avatar/test_xso.py ssssssssssssssssssssssssssssssssssss [ 42%] tests/blocking/test_e2e.py s [ 42%] tests/blocking/test_service.py ssssssssssssssssss [ 43%] tests/blocking/test_xso.py sssssssss [ 43%] tests/bookmarks/test_e2e.py ssssss [ 43%] tests/bookmarks/test_service.py ssssssssssssssssssssssssssssss [ 44%] tests/bookmarks/test_xso.py sssssssssssss [ 44%] tests/carbons/test_service.py ssssssss [ 44%] tests/carbons/test_xso.py ssssssssssssssssssss [ 45%] tests/chatstates/test_utils.py sssssss [ 45%] tests/chatstates/test_xso.py ssss [ 45%] tests/disco/test___init__.py sssss [ 45%] tests/disco/test_service.py ssssssssssssssssssssssssssssssssssssssssssss [ 46%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 47%] tests/disco/test_xso.py sssssssssssssssssssssssssssssssssssssssssss [ 48%] tests/entitycaps/test___init__.py s [ 48%] tests/entitycaps/test_caps115.py ssssssssssssssssssssssssssssssssssss [ 49%] tests/entitycaps/test_caps390.py sssssssssssssssssssssssssssss [ 50%] tests/entitycaps/test_e2e.py ... [ 50%] tests/entitycaps/test_service.py sssssssssssssssssssssssssssssssssssssss [ 51%] ssssssssss [ 51%] tests/entitycaps/test_xso.py ssssssssssssss [ 51%] tests/forms/test___init__.py s [ 51%] tests/forms/test_fields.py sssssssssssssssssssssssssssssssssssssssssssss [ 52%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 54%] ssssssssssssssss [ 54%] tests/forms/test_form.py ssssssssssssssssssssssssssssssssssssssssss [ 55%] tests/forms/test_xso.py ssssssssssssssssssssssssssssssssssssssssssssssss [ 56%] sssssssssssssssssssssssssssssss [ 57%] tests/httpupload/test___init__.py s [ 57%] tests/httpupload/test_e2e.py s [ 57%] tests/httpupload/test_xso.py ssssssssssssssssssssssssssssssssssss [ 58%] tests/ibb/test_e2e.py ... [ 58%] tests/ibb/test_service.py sssssssssssssssssssssssssssssssssssssss [ 59%] tests/ibb/test_xso.py ssssss [ 59%] tests/ibr/test_service.py sssss [ 59%] tests/ibr/test_xso.py sssssssssssssssssssssss [ 59%] tests/im/test_conversation.py sssss [ 59%] tests/im/test_dispatcher.py ssssssssssssssssss [ 60%] tests/im/test_p2p.py sssssssssssssssssssssssssssssssss.. [ 61%] tests/im/test_service.py sssssssssss [ 61%] tests/mdr/test_e2e.py . [ 61%] tests/mdr/test_service.py sssssssssssssssssssss [ 61%] tests/mdr/test_xso.py sssssssss [ 62%] tests/misc/test_delay.py ssss [ 62%] tests/misc/test_forwarding.py sss [ 62%] tests/misc/test_json.py sssssssssssss [ 62%] tests/misc/test_markers.py ssssssssss [ 62%] tests/misc/test_oob.py sssss [ 62%] tests/misc/test_openpgp_legacy.py ssssssssss [ 63%] tests/misc/test_pars.py sssss [ 63%] tests/misc/test_replace.py ssss [ 63%] tests/misc/test_stanzaid.py sssssssssssssss [ 63%] tests/muc/test_e2e.py ......s..FF.FF.s [ 63%] tests/muc/test_self_ping.py ssssssssssssssssssssssssssssssssssssssssssss [ 64%] sssssssssssssssssssssss [ 65%] tests/muc/test_service.py ssssssssssssssssssssssssssssssssssssssssssssss [ 66%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 68%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 69%] sss [ 69%] tests/muc/test_xso.py ssssssssssssssssssssssssssssssssssssssssssssssssss [ 70%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 72%] tests/pep/test_e2e.py sssss [ 72%] tests/pep/test_service.py ssssssssssssssssssssss [ 72%] tests/ping/test_e2e.py ..... [ 72%] tests/ping/test_service.py sssssssssss [ 73%] tests/ping/test_xso.py ssss [ 73%] tests/presence/test___init__.py ss [ 73%] tests/presence/test_e2e.py .. [ 73%] tests/presence/test_service.py ssssssssssssssssssssssssssssssssssss [ 74%] tests/private_xml/test_e2e.py ss [ 74%] tests/private_xml/test_service.py sss [ 74%] tests/private_xml/test_xso.py ssssss [ 74%] tests/pubsub/test_service.py sssssssssssssssssssssssssssssssssssssssssss [ 75%] sssssssssssssssssss [ 75%] tests/pubsub/test_xso.py sssssssssssssssssssssssssssssssssssssssssssssss [ 76%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 78%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 79%] sssssssssssssssssssssssssssssss [ 80%] tests/roster/test___init__.py ssss [ 80%] tests/roster/test_service.py sssssssssssssssssssssssssssssssssssssssssss [ 81%] sssssssssssssssss [ 82%] tests/roster/test_xso.py ssssssssssssssssssssss [ 82%] tests/rsm/test_xso.py sssssssssssssssssssssssssssssssssss [ 83%] tests/shim/test_service.py sssss [ 83%] tests/shim/test_xso.py sssssssssssssss [ 83%] tests/vcard/test_service.py ssssss [ 83%] tests/vcard/test_xso.py ssssssss [ 84%] tests/version/test_e2e.py ... [ 84%] tests/version/test_service.py sssssssssssssssssss [ 84%] tests/version/test_xso.py sssssss [ 84%] tests/xso/test___init__.py ssssssssssssssss [ 85%] tests/xso/test_model.py ssssssssssssssssssssssssssssssssssssssssssssssss [ 86%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 87%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 89%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 90%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 92%] sssssssssssssssssssssssssssssssssssssssssssssssssss [ 93%] tests/xso/test_query.py ssssssssssssssssssssssssssssssssssssssssssssssss [ 94%] sssssssssssssssssssssssssssssssssss [ 95%] tests/xso/test_types.py ssssssssssssssssssssssssssssssssssssssssssssssss [ 96%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 98%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 99%] ssssssssssssssss [100%] =================================== FAILURES =================================== _______________________ TestMuc.test_mediated_invitation _______________________ self = @blocking_timed async def test_mediated_invitation(self): thirdmuc = self.thirdwitch.summon(aioxmpp.MUCClient) invite_fut = asyncio.Future() def on_invite(message, muc_address, inviter_address, mode, **kwargs): invite_fut.set_result( (message, muc_address, inviter_address, mode, kwargs) ) return True thirdmuc.on_muc_invitation.connect(on_invite) token, _ = await self.firstroom.invite( self.thirdwitch.local_jid, text="some invitation text", mode=aioxmpp.im.InviteMode.MEDIATED, ) await token > message, muc_address, inviter_address, mode, kwargs = await invite_fut E asyncio.exceptions.CancelledError tests/muc/test_e2e.py:738: CancelledError During handling of the above exception, another exception occurred: fut = > timeout = 4.0 async def wait_for(fut, timeout, *, loop=None): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. This function is a coroutine. """ if loop is None: loop = events.get_running_loop() else: warnings.warn("The loop argument is deprecated since Python 3.8, " "and scheduled for removal in Python 3.10.", DeprecationWarning, stacklevel=2) if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc else: raise exceptions.TimeoutError() waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: > fut.result() E asyncio.exceptions.CancelledError /opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/asyncio/tasks.py:492: CancelledError The above exception was the direct cause of the following exception: aioxmpp/e2etest/utils.py:41: in wrapped return loop.run_until_complete(f(*args, **kwargs)) /opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/asyncio/base_events.py:642: in run_until_complete return future.result() aioxmpp/e2etest/__init__.py:344: in wrapper await asyncio.wait_for(f(*args, **kwargs), timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fut = > timeout = 4.0 async def wait_for(fut, timeout, *, loop=None): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. This function is a coroutine. """ if loop is None: loop = events.get_running_loop() else: warnings.warn("The loop argument is deprecated since Python 3.8, " "and scheduled for removal in Python 3.10.", DeprecationWarning, stacklevel=2) if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc else: raise exceptions.TimeoutError() waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: fut.result() except exceptions.CancelledError as exc: > raise exceptions.TimeoutError() from exc E asyncio.exceptions.TimeoutError /opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/asyncio/tasks.py:494: TimeoutError _____________________________ TestMuc.test_muc_pms _____________________________ self = @blocking_timed async def test_muc_pms(self): firstwitch_convs = self.firstwitch.summon( aioxmpp.im.service.ConversationService ) firstconv_future = asyncio.Future() first_msgs = asyncio.Queue() def conv_added(conversation): firstconv_future.set_result(conversation) def message(message, member, source, **kwargs): first_msgs.put_nowait((message, member, source)) conversation.on_message.connect(message) return True firstwitch_convs.on_conversation_added.connect(conv_added) secondwitch_p2p = self.secondwitch.summon( aioxmpp.im.p2p.Service, ) secondconv = secondwitch_p2p.get_conversation( self.secondroom.members[1].conversation_jid ) msg = aioxmpp.Message(type_=aioxmpp.MessageType.CHAT) msg.body[None] = "I'll give thee a wind." await secondconv.send_message(msg) > firstconv = await firstconv_future E asyncio.exceptions.CancelledError tests/muc/test_e2e.py:548: CancelledError During handling of the above exception, another exception occurred: fut = > timeout = 4.0 async def wait_for(fut, timeout, *, loop=None): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. This function is a coroutine. """ if loop is None: loop = events.get_running_loop() else: warnings.warn("The loop argument is deprecated since Python 3.8, " "and scheduled for removal in Python 3.10.", DeprecationWarning, stacklevel=2) if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc else: raise exceptions.TimeoutError() waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: > fut.result() E asyncio.exceptions.CancelledError /opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/asyncio/tasks.py:492: CancelledError The above exception was the direct cause of the following exception: aioxmpp/e2etest/utils.py:41: in wrapped return loop.run_until_complete(f(*args, **kwargs)) /opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/asyncio/base_events.py:642: in run_until_complete return future.result() aioxmpp/e2etest/__init__.py:344: in wrapper await asyncio.wait_for(f(*args, **kwargs), timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fut = > timeout = 4.0 async def wait_for(fut, timeout, *, loop=None): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. This function is a coroutine. """ if loop is None: loop = events.get_running_loop() else: warnings.warn("The loop argument is deprecated since Python 3.8, " "and scheduled for removal in Python 3.10.", DeprecationWarning, stacklevel=2) if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc else: raise exceptions.TimeoutError() waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: fut.result() except exceptions.CancelledError as exc: > raise exceptions.TimeoutError() from exc E asyncio.exceptions.TimeoutError /opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/asyncio/tasks.py:494: TimeoutError __________________________ TestMuc.test_send_message ___________________________ self = @blocking_timed async def test_send_message(self): msg_future = asyncio.Future() def onmessage(message, member, source, **kwargs): nonlocal msg_future msg_future.set_result((message, member,)) return True self.secondroom.on_message.connect(onmessage) msg = aioxmpp.Message(type_=aioxmpp.MessageType.CHAT) msg.body.update({None: "foo"}) await self.firstroom.send_message(msg) > message, member, = await msg_future E asyncio.exceptions.CancelledError tests/muc/test_e2e.py:496: CancelledError During handling of the above exception, another exception occurred: fut = > timeout = 4.0 async def wait_for(fut, timeout, *, loop=None): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. This function is a coroutine. """ if loop is None: loop = events.get_running_loop() else: warnings.warn("The loop argument is deprecated since Python 3.8, " "and scheduled for removal in Python 3.10.", DeprecationWarning, stacklevel=2) if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc else: raise exceptions.TimeoutError() waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: > fut.result() E asyncio.exceptions.CancelledError /opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/asyncio/tasks.py:492: CancelledError The above exception was the direct cause of the following exception: aioxmpp/e2etest/utils.py:41: in wrapped return loop.run_until_complete(f(*args, **kwargs)) /opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/asyncio/base_events.py:642: in run_until_complete return future.result() aioxmpp/e2etest/__init__.py:344: in wrapper await asyncio.wait_for(f(*args, **kwargs), timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fut = > timeout = 4.0 async def wait_for(fut, timeout, *, loop=None): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. This function is a coroutine. """ if loop is None: loop = events.get_running_loop() else: warnings.warn("The loop argument is deprecated since Python 3.8, " "and scheduled for removal in Python 3.10.", DeprecationWarning, stacklevel=2) if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc else: raise exceptions.TimeoutError() waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: fut.result() except exceptions.CancelledError as exc: > raise exceptions.TimeoutError() from exc E asyncio.exceptions.TimeoutError /opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/asyncio/tasks.py:494: TimeoutError ______________________ TestMuc.test_send_tracked_message _______________________ self = @blocking_timed async def test_send_tracked_message(self): msg_future = asyncio.Future() sent_future = asyncio.Future() def onmessage(message, member, source, **kwargs): nonlocal msg_future msg_future.set_result((message,)) return True def onstatechange(state, response=None): if state == aioxmpp.tracking.MessageState.DELIVERED_TO_RECIPIENT: sent_future.set_result(None) return True self.secondroom.on_message.connect(onmessage) msg = aioxmpp.Message(aioxmpp.MessageType.NORMAL) msg.body[None] = "foo" token, tracker = self.firstroom.send_message_tracked(msg) tracker.on_state_changed.connect(onstatechange) > await sent_future E asyncio.exceptions.CancelledError tests/muc/test_e2e.py:473: CancelledError During handling of the above exception, another exception occurred: fut = > timeout = 4.0 async def wait_for(fut, timeout, *, loop=None): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. This function is a coroutine. """ if loop is None: loop = events.get_running_loop() else: warnings.warn("The loop argument is deprecated since Python 3.8, " "and scheduled for removal in Python 3.10.", DeprecationWarning, stacklevel=2) if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc else: raise exceptions.TimeoutError() waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: > fut.result() E asyncio.exceptions.CancelledError /opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/asyncio/tasks.py:492: CancelledError The above exception was the direct cause of the following exception: aioxmpp/e2etest/utils.py:41: in wrapped return loop.run_until_complete(f(*args, **kwargs)) /opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/asyncio/base_events.py:642: in run_until_complete return future.result() aioxmpp/e2etest/__init__.py:344: in wrapper await asyncio.wait_for(f(*args, **kwargs), timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fut = > timeout = 4.0 async def wait_for(fut, timeout, *, loop=None): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. This function is a coroutine. """ if loop is None: loop = events.get_running_loop() else: warnings.warn("The loop argument is deprecated since Python 3.8, " "and scheduled for removal in Python 3.10.", DeprecationWarning, stacklevel=2) if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc else: raise exceptions.TimeoutError() waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: fut.result() except exceptions.CancelledError as exc: > raise exceptions.TimeoutError() from exc E asyncio.exceptions.TimeoutError /opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/asyncio/tasks.py:494: TimeoutError =============================== warnings summary =============================== :91: 32 warnings :91: DeprecationWarning: invalid escape sequence \. :92: 32 warnings :92: DeprecationWarning: invalid escape sequence \. :103: 32 warnings :103: DeprecationWarning: invalid escape sequence \. tests/test_stanza.py:42 /home/runner/work/Openfire/Openfire/aioxmpp/tests/test_stanza.py:42: PytestCollectionWarning: cannot collect test class 'TestPayload' because it has a __init__ constructor (from: tests/test_stanza.py) @stanza.IQ.as_payload_class :237 :237 :237 :237: DeprecationWarning: invalid escape sequence \. :247 :247 :247 :247: DeprecationWarning: invalid escape sequence \. :257 :257 :257 :257: DeprecationWarning: invalid escape sequence \. :267 :267 :267 :267: DeprecationWarning: invalid escape sequence \. tests/ibb/test_e2e.py:36 /home/runner/work/Openfire/Openfire/aioxmpp/tests/ibb/test_e2e.py:36: PytestCollectionWarning: cannot collect test class 'TestProtocol' because it has a __init__ constructor (from: tests/ibb/test_e2e.py) class TestProtocol(asyncio.Protocol): tests/ibb/test_service.py:297 /home/runner/work/Openfire/Openfire/aioxmpp/tests/ibb/test_service.py:297: PytestCollectionWarning: cannot collect test class 'TestProtocol' because it has a __init__ constructor (from: tests/ibb/test_service.py) class TestProtocol(asyncio.Protocol): :3074: 36 warnings :3074: DeprecationWarning: invalid escape sequence \. tests/test_e2e.py: 8 warnings tests/adhoc/test_e2e.py: 13 warnings tests/entitycaps/test_e2e.py: 10 warnings tests/ibb/test_e2e.py: 6 warnings tests/im/test_p2p.py: 6 warnings tests/mdr/test_e2e.py: 2 warnings tests/muc/test_e2e.py: 48 warnings tests/ping/test_e2e.py: 15 warnings tests/presence/test_e2e.py: 4 warnings tests/version/test_e2e.py: 6 warnings /home/runner/work/Openfire/Openfire/aioxmpp/aioxmpp/node.py:1573: DeprecationWarning: using an available presence state for UseConnected is deprecated and will raise ValueError as of 1.0 warnings.warn( tests/test_e2e.py::TestMessaging::test_message_from_a_to_b /home/runner/work/Openfire/Openfire/aioxmpp/aioxmpp/stream.py:2778: DeprecationWarning: register_message_callback is deprecated; use aioxmpp.dispatcher.SimpleMessageDispatcher instead stream.register_message_callback( tests/test_e2e.py::TestMessaging::test_message_from_a_to_b /home/runner/work/Openfire/Openfire/aioxmpp/aioxmpp/stream.py:2786: DeprecationWarning: unregister_message_callback is deprecated; use aioxmpp.dispatcher.SimpleMessageDispatcher instead stream.unregister_message_callback( tests/adhoc/test_e2e.py::TestAdHocServer::test_execute_simple_command tests/adhoc/test_e2e.py::TestAdHocServer::test_execute_simple_command tests/adhoc/test_e2e.py::TestAdHocServer::test_properly_fail_for_unknown_command /home/runner/work/Openfire/Openfire/aioxmpp/aioxmpp/stream.py:2563: DeprecationWarning: send_iq_and_wait_for_reply is deprecated and will be removed in 1.0 warnings.warn( tests/adhoc/test_e2e.py::TestAdHocServer::test_execute_simple_command tests/adhoc/test_e2e.py::TestAdHocServer::test_execute_simple_command tests/adhoc/test_e2e.py::TestAdHocServer::test_properly_fail_for_unknown_command tests/version/test_e2e.py::TestVersion::test_version_query_against_server tests/version/test_e2e.py::TestVersion::test_version_query_returns_service_unavailable_if_unconfigured tests/version/test_e2e.py::TestVersion::test_version_query_with_results /home/runner/work/Openfire/Openfire/aioxmpp/aioxmpp/node.py:792: DeprecationWarning: send() on StanzaStream is deprecated and will be removed in 1.0. Use send() on the Client instead. warnings.warn("send() on StanzaStream is deprecated and will " -- Docs: https://docs.pytest.org/en/stable/warnings.html =========================== short test summary info ============================ FAILED tests/muc/test_e2e.py::TestMuc::test_mediated_invitation - asyncio.exc... FAILED tests/muc/test_e2e.py::TestMuc::test_muc_pms - asyncio.exceptions.Time... FAILED tests/muc/test_e2e.py::TestMuc::test_send_message - asyncio.exceptions... FAILED tests/muc/test_e2e.py::TestMuc::test_send_tracked_message - asyncio.ex... === 4 failed, 40 passed, 4485 skipped, 4 deselected, 276 warnings in 53.12s ====