Skip to content

test(computers): the clock panel test reads the config a call left once it has seen the call - #835

Merged
earakely-scale merged 1 commit into
mainfrom
edgararakelyan/clock-panel-test-race
Nov 20, 2026
Merged

earakely-scale merged 1 commit into
mainfrom
edgararakelyan/clock-panel-test-race

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

What

tst/unit/env/envs/test_computer_clock_panel.py stands in for xfconf-query with a small script that keeps the panel's config in a JSON file. That script recorded each call before running it, and wrote the config in place (open(..., "w") then json.dump). A test that waited for the third call and then read the config could therefore read it:

The stand-in now records a call, keeping the time the call began, only once the call is done (including the reset it's told to fail), and replaces the config whole (os.replace). The panel under test (clock-panel) and every assertion are unchanged.

Proof

  • With a 0.3 s sleep added just before the config write, to widen the window:
    • the old stand-in fails test_an_unarmed_clock_… with the same JSONDecodeError as CI;
    • the new stand-in passes all 6 tests.
  • The fixed file passes 6/6, three runs in a row; ruff check is clean.

Test-only; no docs changes.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

This test-only change appears safe to merge.

Summary

This test-only change makes recorded calls a reliable signal that the fake panel command has finished updating its config.

  • The clock-panel test reads a complete config after each logged call.

No actionable issues found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "test(computers): the clock panel test re..." · Reviewed by Greptile

…ce it has seen the call

The test's xfconf-query stand-in recorded each call before running it and wrote the
panel's config in place, so a test that waited for a call and then read the config
could read it truncated (JSONDecodeError, as unit (2/2) hit on #830) or as it was
before the call. The stand-in now records a call, with when it began, once the call
is done, and replaces the config whole.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale requested a review from a team as a code owner November 20, 2026 01:34
@earakely-scale
earakely-scale merged commit 71fea7f into main Nov 20, 2026
35 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/clock-panel-test-race branch November 20, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant