Skip to content

fix(ci): give each plotter test its own device name - #3758

Merged
FredApps merged 1 commit into
mainfrom
fix/freebsd-plotter-test-names
Dec 2, 2026
Merged

FredApps merged 1 commit into
mainfrom
fix/freebsd-plotter-test-names

Conversation

@FredApps

@FredApps FredApps commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

main's nightly FreeBSD job has failed since Nov 29 on one test (latest run):

paper_margins_are_checked_against_their_own_axis panicked at crates/engine/tests/plotters.rs:348:
BadParams { cmd: "plottermanager", msg: "plotter `Banner Printer` already exists" }

Cause: session() installs PlotterStore::memory(), one store for the whole test process. Three tests in crates/engine/tests/plotters.rs each create a device called Banner Printer: a_landscape_page_gets_the_papers_margins_back, an_orientation_only_pagesetup_turns_the_retained_margins and paper_margins_are_checked_against_their_own_axis (from #1266). The hosted gate runs each test in its own process with nextest, so they never meet there. The FreeBSD job runs cargo test, where the tests are threads of one process, so whichever runs later finds the device already there.

Fix: each of the three tests now creates a device with its own name. The assertions are unchanged, and nothing outside the test file changes.

Checks: rustfmt --check on the file. The hosted gate runs on this PR, and I dispatched the FreeBSD workflow on this branch, since it doesn't run on PRs.

Summary by CodeRabbit

  • Tests
    • Updated printer names in setup tests. Existing coverage remains for paper orientation, margin handling during paper resizing, and validation against paper dimensions.

The in-memory plotter store is shared by the whole test process. On
FreeBSD the tests run as threads of one process (cargo test), so the
three tests that each create a "Banner Printer" collide and the later
one fails with "plotter `Banner Printer` already exists". Each test now
creates a device with its own name.
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Plotter tests now use distinct printer names for landscape-paper, orientation-only PAGESETUP, and margin-axis scenarios. The existing paper dimensions, margin checks, and orientation assertions remain unchanged.

Changes: Plotter test printer names

Layer / File(s) Summary
Use distinct printer names
crates/engine/tests/plotters.rs
The landscape-paper, orientation-only PAGESETUP, and margin-axis tests use distinct printer names. Their existing assertions remain unchanged.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other

Suggested reviewers: midasmatterhorn

Merge Risk: Minimal · up to 88f76

This change only gives plotter tests distinct printer names so they no longer collide when run in a single process. It does not touch production code, and merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: each plotter test now gets its own device name, which fixes the FreeBSD failure caused by a duplicate 'Banner Printer' name in a shared in-memory PlotterStore. The raw…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: each plotter test now gets its own device name, which fixes the FreeBSD failure caused by a duplicate 'Banner Printer' name in a shared in-memory PlotterStore. The raw summary and objectives both confirm that the three tests in crates/engine/tests/plotters.rs now use distinct printer names. The 'fix(ci)' scope is slightly off, since the change is in test code, but the title still describes the primary change accurately.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 5ef8b34 and 88f76a9.

Files selected for processing: 1

  • crates/engine/tests/plotters.rs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@FredApps
FredApps merged commit 46ebd11 into main Dec 2, 2026
18 of 19 checks passed
@FredApps

FredApps commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged: the three plotter tests now use distinct printer names, so they no longer collide in the shared in-memory PlotterStore on FreeBSD. Test-only change. CI and FreeBSD passed; the one SonarCloud shard failure (Tests 2/4) was a lost-runner infra error, not the PR.

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