fix: Don't set download state to Failure if message is available on another Session's transport (#7684)#7794
Open
fix: Don't set download state to Failure if message is available on another Session's transport (#7684)#7794
Conversation
58a4ab7 to
86e446f
Compare
…nother Session's transport (#7684)
86e446f to
5b0ad60
Compare
Collaborator
Author
|
...
log.section("ac1_clone receives a message via the new primary transport")
ac1_chat = ac1.create_chat(bob)
ac1_chat.send_text("Hello!")
> bob_chat_id = bob.wait_for_incoming_msg_event().chat_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_multitransport.py:263:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py/lib/python3.14/site-packages/deltachat_rpc_client/account.py:414: in wait_for_incoming_msg_event
return self.wait_for_event(EventType.INCOMING_MSG)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py/lib/python3.14/site-packages/deltachat_rpc_client/account.py:35: in wait_for_event
next_event = AttrDict(self._rpc.wait_for_event(self.id))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py/lib/python3.14/site-packages/deltachat_rpc_client/rpc.py:173: in wait_for_event
return queue.get()
^^^^^^^^^^^
/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/queue.py:199: in get
self.not_empty.wait()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Condition(<unlocked _thread.lock object at 0x10321ae90>, 0)>
timeout = None
def wait(self, timeout=None):
"""Wait until notified or until a timeout occurs.
If the calling thread has not acquired the lock when this method is
called, a RuntimeError is raised.
This method releases the underlying lock, and then blocks until it is
awakened by a notify() or notify_all() call for the same condition
variable in another thread, or until the optional timeout occurs. Once
awakened or timed out, it re-acquires the lock and returns.
When the timeout argument is present and not None, it should be a
floating-point number specifying a timeout for the operation in seconds
(or fractions thereof).
When the underlying lock is an RLock, it is not released using its
release() method, since this may not actually unlock the lock when it
was acquired multiple times recursively. Instead, an internal interface
of the RLock class is used, which really unlocks it even when it has
been recursively acquired several times. Another internal interface is
then used to restore the recursion level when the lock is reacquired.
"""
if not self._is_owned():
raise RuntimeError("cannot wait on un-acquired lock")
waiter = _allocate_lock()
waiter.acquire()
self._waiters.append(waiter)
saved_state = self._release_save()
gotit = False
try: # restore state no matter what (e.g., KeyboardInterrupt)
if timeout is None:
> waiter.acquire()
E Failed: Timeout (>300.0s) from pytest-timeout.
...
DEBUG root:rpc.py:164 account_id=2 got an event {'kind': 'Info', 'msg': 'src/configure.rs:265: Configure ...'}
... (no logs with account_id=2 here)
========== ac1_clone receives a message via the new primary transport ==========
DEBUG root:rpc.py:164 account_id=2 got an event {'kind': 'Info', 'msg': 'src/key.rs:331: Generating keypair.'}
DEBUG root:rpc.py:164 account_id=2 got an event {'kind': 'AccountsItemChanged'}
DEBUG root:rpc.py:164 account_id=2 got an event {'kind': 'Info', 'msg': 'src/key.rs:337: Keypair generated in 0s.'}
...Not related to this PR of course. I.e. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checked also manually in Desktop on top of 2631745. I.e. the bug is reproducible with pre-messages as well.
Fix #7684