Slow tests:
- TestPerformance inserted 10 000 records three times per backend. One
test per backend now times insert, save and load on the same records,
with the same assertions.
- test_measurement_realtime_stream slept one second per update, 20 s per
backend. The updates use synthetic timestamps one second apart in the
recent past, without a pause, and send the same duplicates,
out-of-order and burst writes.
- test_readers_never_see_a_partial_document: the readers spun on the
cache and kept the writer waiting for the GIL (~50 s). They now yield
with time.sleep(0) after each lookup (~0.5 s); a non-atomic save still
fails the test 10 of 10 times.
- test_devicessettingsbattery.py compiled the same plain profile before
each of its 235 tests. A module-scoped fixture compiles it once; a
compiled profile is frozen and may be shared (20.8 s -> 9.4 s).
- The --finalize case of test_geneticoptimize.py runs 250 instead of
400 generations. For this input and seed the best fitness is final in
generation 213, and the solutions after 250 and 400 generations are
identical field by field. The test checks the keys and the consistency
of the result, not the schedule, so it detects the same as before
(127 s -> 80 s on GitHub runners). test_genetic0optimize.py keeps 400.
Tests that depended on another test of the same process, found by
running them in another order and under pytest-xdist:
- TestPredictionContainer::test_len relied on a class flag that a
TestPredictionProvider fixture set and never reset. Both fixtures now
set the flags with monkeypatch.
- The EnergyCharts status code test got a cached response from an
earlier test; it now calls _request_forecast(force_update=True) and
asserts that the request was made.
- test_ingress_safe_links did not wait for EOSdash, which EOS starts
after its own startup.
- test_forward_stream_truncates_very_long_line found the log queue left
behind by test_server_start_eosdash (no worker, closed event loop). It
installs its own queue now, and test_server_start_eosdash no longer
leaves its queue behind. Dropping lines from a full queue was only
covered through that left-over queue and gets a test of its own.
Refs #1553
Co-authored-by: SchaafAlexander <86607129+SchaafAlexander@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: SchaafAlexander <86607129+SchaafAlexander@users.noreply.github.com>
Assisted-by: Claude Code (claude-opus-5-5)
Assisted-by: Claude Code (claude-fable-5-2)