HomeSoftware Heritage

writer: make calling flush() in write_addition(s)() optional

Description

writer: make calling flush() in write_addition(s)() optional

using a constructor 'auto_flush' bookean argument.
The idea is that in a test session, each call to 'flush()' takes ~1s to
run, so having the test handling a single call to flush() when needed
(instead of n calls) make test execution significantly faster.

For example, swh-storage's test_replay.py execution went from ~140s to
~40s, and test_backfill.py from ~40s to ~15s.

Details

Provenance
douarddaAuthored on Oct 18 2022, 3:34 PM
douarddaPushed on Oct 21 2022, 4:31 PM
Differential Revision
D8705: writer: make calling flush() in write_addition(s)() optional
Parents
rDJNL04a84dba6a17: tests: make the kafka_server_base fixture a function scoped one
Branches
Unknown
Tags
Unknown
References
tag: v1.2.0
Build Status
Buildable 32495
Build 50888: test-and-buildJenkins console · Jenkins