Skip to content

docs(dev): testing guide states which tests to write and that they wait for events, not time - #696

Open
PiquelChips wants to merge 2 commits into
test/expiry-waitsfrom
test/testing-rules
Open

PiquelChips wants to merge 2 commits into
test/expiry-waitsfrom
test/testing-rules

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

The engineering standard now has rules on which tests to write and how they wait. The testing guide didn't state them yet, so this PR adds them. It closes the stack that brings the tests in line.

Stacked on #695.

Changes

docs/dev/testing.md, under "Write a focused test", now says:

  • Test a behaviour once, at the lowest layer that fails without the change.
  • Extend an existing test or table before adding a new test.
  • A fix to logic, data, state or a protocol comes with a test that fails without it, written first. A purely visual fix is shown with before and after screenshots instead.
  • Tests wait for events, not time. The bullet names this repository's tools: a watch on the test's fake, until_blocked, paused tokio time, the expire fixtures, and // wall-clock: <why> for a real peer, a lock wait PostgreSQL shows only in its catalog views, or code that reads the system clock. It also names Database::exclusive and the pause/advance/resume pattern.

docs/dev/rust-conventions.md links to that section from its tests paragraph.

Checks

just docs builds the book, and every link resolves.

Council review

Rounds: 3

Delegate Round 1 Round 2 Round 3
GPT 6.1 Sol no score no score no score
Claude Opus 5.5 8/10 9/10 9/10
Claude Fable 5.2 8/10 8/10 9/10

GPT 6.1 Sol could not take part: its account hit its usage limit.

Note

Written by Claude Opus 5.5 in Claude Code and reviewed by Claude Opus 5.5 and Claude Fable 5.2 (via T3 Code)

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b89ec99f-ed71-46c1-9562-84868683e214

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@PiquelChips
PiquelChips marked this pull request as ready for review November 22, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

1 participant