Skip to content

fix(cram): show partial output on timeout#15269

Open
rgrinberg wants to merge 1 commit into
ocaml:mainfrom
rgrinberg:push-ykwlsomsnsuw
Open

fix(cram): show partial output on timeout#15269
rgrinberg wants to merge 1 commit into
ocaml:mainfrom
rgrinberg:push-ykwlsomsnsuw

Conversation

@rgrinberg

Copy link
Copy Markdown
Member

When cram tests time out, it's helpful to see the partial output emitted so far instead of an error message. This PR accomplishes that.

@rgrinberg rgrinberg force-pushed the push-ykwlsomsnsuw branch from be8c1e7 to 87e1a43 Compare June 21, 2026 14:23
$ cat > dune <<EOF
> (cram
> (timeout 0.1))
> (timeout 0.5))

@Alizter Alizter Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why bump the timeout? Won't this make the test slow?

@rgrinberg rgrinberg Jun 26, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Because we need to give this enough time to print some output so that the test doesn't flake.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you do this with an external FIFO or something?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There's still a reliance on dune's internal timer firing at a certain point.

@rgrinberg rgrinberg linked an issue Jun 22, 2026 that may be closed by this pull request
@rgrinberg rgrinberg force-pushed the push-ykwlsomsnsuw branch from 87e1a43 to 7011a58 Compare June 26, 2026 23:13
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg rgrinberg force-pushed the push-ykwlsomsnsuw branch from 7011a58 to 4c68bb4 Compare June 27, 2026 00:35
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.

Timed out cram tests should offer partial promotions

2 participants