core icon indicating copy to clipboard operation
core copied to clipboard

`test_import_export_online_all` failed because of the import progress jumping over 249

Open iequidoo opened this issue 1 year ago • 0 comments

https://github.com/deltachat/deltachat-core-rust/actions/runs/10132963150/job/28017593275

        lp.sec("import backup and check it's proper")
        with ac2.temp_plugin(ImexTracker()) as imex_tracker:
            ac2.import_all(path)
    
            # check progress events for import
>           assert imex_tracker.wait_progress(1, progress_upper_limit=249)

tests/test_1_online.py:1564: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <deltachat.tracker.ImexTracker object at 0x7fe8e00d8490>
target_progress = 1, progress_upper_limit = 249, progress_timeout = 60

    def wait_progress(self, target_progress, progress_upper_limit=1000, progress_timeout=60):
        while True:
            ev = self._imex_events.get(timeout=progress_timeout)
            if isinstance(ev, int) and ev >= target_progress:
>               assert ev <= progress_upper_limit, (
                    str(ev) + " exceeded upper progress limit " + str(progress_upper_limit)
                )
E               AssertionError: 661 exceeded upper progress limit 249
E               assert 661 <= 249

I haven't yet understood how this is possible because we always report progress=10 here: https://github.com/deltachat/deltachat-core-rust/blob/354702fcab6e5d6709beea2ad1f3225ccfb02d7c/src/imex.rs#L218. Probably this is related to the recent changes to the backup export/import, but it seems that the bug is in the test e.g. it misses the corresponding event.

iequidoo avatar Jul 28 '24 21:07 iequidoo