Skip to content

test(gpui): pin the clock in the same-second diagnostics report test - #2715

Open
richiemcilroy wants to merge 1 commit into
mainfrom
fix/gpui-diagnostics-test-clock
Open

richiemcilroy wants to merge 1 commit into
mainfrom
fix/gpui-diagnostics-test-clock

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

diagnostics::tests::reports_in_the_same_second_do_not_collide read the wall clock once per report, so whenever a second boundary fell between its two writes the stamps differed and the test failed. It has been failing other PRs' Intel macOS desktop job intermittently (e.g. #2664 and #2673: left: Some(1792431796) right: Some(1792431797)).

write_report_into now takes the time from a small write_report_at(dir, report, stamp), and the test passes the same second to both writes. Production behaviour is unchanged: write_report_into still stamps with SystemTime::now().

cargo test --bin cap-gpui -- diagnostics: 14 passed.

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge.

Summary

Makes reports_in_the_same_second_do_not_collide independent of the wall clock.

  • The same-second report test uses one fixed timestamp for both writes.

Reviews (1) · Last reviewed commit: "test(gpui): pin the clock in the same-se..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cap-status Ready Ready Preview Oct 19, 2026 6:03pm UTC

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

Open in Capy

This branch was successfully deployed

2 active deployments
Preview – cap-web — b7742b9d Deployed Oct 19, 2026 by vercel[bot]
Preview – cap-status — b7742b9d Deployed Oct 19, 2026 by vercel[bot]
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