Skip to content

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

Merged
rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-ykwlsomsnsuw
Jun 27, 2026
Merged

fix(cram): show partial output on timeout#15269
rgrinberg merged 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 6 times, most recently from 452b50f to ff50790 Compare June 27, 2026 15:05
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

refactor(cram): simplify timeout output handling

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg
rgrinberg force-pushed the push-ykwlsomsnsuw branch from ff50790 to f2bb826 Compare June 27, 2026 16:38
@rgrinberg
rgrinberg merged commit 9bc031b into ocaml:main Jun 27, 2026
30 checks passed
@Alizter Alizter added this to the 3.25.0 milestone Jul 8, 2026
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