Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_logged_ac_process_ffi_failure is flaky #6086

Open
link2xt opened this issue Oct 21, 2024 · 4 comments
Open

test_logged_ac_process_ffi_failure is flaky #6086

link2xt opened this issue Oct 21, 2024 · 4 comments
Labels
bug Something is not working

Comments

@link2xt
Copy link
Collaborator

link2xt commented Oct 21, 2024

Not the first time I see this failure.

Attached logs:
job-logs.txt

@Septias
Copy link
Collaborator

Septias commented Oct 22, 2024

I ran the test 100times locally and did not notice any flaky behaviour

@r10s r10s added the bug Something is not working label Nov 11, 2024
@link2xt
Copy link
Collaborator Author

link2xt commented Nov 27, 2024

Just happened again:
job-logs.txt

@iequidoo
Copy link
Collaborator

iequidoo commented Dec 2, 2024

Again: job-logs.txt
Btw all failures here are on macOS. Failed to reproduce this failure locally on Linux running the test in a loop.

EDIT: Again macOS: job-logs.txt

@link2xt
Copy link
Collaborator Author

link2xt commented Jan 3, 2025

The whole failure is essentially this:

acfactory = <deltachat.testplugin.ACFactory object at 0x0000000119a0d5c8>

    def test_logged_ac_process_ffi_failure(acfactory):
        from deltachat import account_hookimpl
    
        ac1 = acfactory.get_pseudo_configured_account()
    
        class FailPlugin:
            @account_hookimpl
            def ac_process_ffi_event(ffi_event):
                0 / 0
    
        cap = Queue()
        ac1.log = cap.put
        ac1.add_account_plugin(FailPlugin())
        # cause any event eg contact added/changed
        ac1.create_contact("[email protected]")
        res = cap.get(timeout=10)
>       assert "ac_process_ffi_event" in res
E       AssertionError: assert 'ac_process_ffi_event' in 'DC_EVENT_ACCOUNTS_ITEM_CHANGED data1=0 data2=0'

tests/test_4_lowlevel.py:220: AssertionError

DC_EVENT_ACCOUNTS_ITEM_CHANGED was logged after setting ac1.log but before setting a fail plugin.

I made a fix at #6403

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants