⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@JakobJingleheimer
Copy link
Member

cc @vespa7

Outstanding questions:

  • Should the default number of re-tries be configurable, and if so, how? (Environment variable? flag? config file?)

@avivkeller
Copy link
Member

avivkeller commented Jan 13, 2026

I recall this issue being opened a while back, and if I remember correctly, we didn't want to add a pattern that promotes not fixing flaky tests

Edit:

@JakobJingleheimer
Copy link
Member Author

JakobJingleheimer commented Jan 13, 2026

Thanks Aviv!

Moshe was on the team call I proposed this (I'm pretty sure he was still there—he dropped for a few seconds had then had to leave a few minutes early), and he's the only quasi-dissenter in nodejs/node#48754

I see comments that there was a second dissenter on your PR, but I don't see who it was.

EDIT: oh, actually Moshe read the meeting notes too (or at least indicated he had) and it's called out twice in them. So I think we're okay to proceed?

Perhaps we can resurrect your PR or, if not entirely, leverage parts of it (with Co-author credit of course). Yours might have a very different design (I haven't checked yet), and maybe Moshe liked the broad-strokes of this that were highlighted in the meeting .

@MoLow
Copy link
Member

MoLow commented Jan 13, 2026

I have objected to this (not the exact same propasal) in the past but I wont block if someone wants to pick it up again

@JakobJingleheimer
Copy link
Member Author

Thanks Moshe! I read through your past concerns, and I agree with the sentiment (to not encourage users to ignore problems). Can you think of anything that we could incorporate into this that would limit that or encourage fixing the flakiness? Perhaps something mildly unpleasant that one could ignore but is ever-so-slightly irksome (just enough that one could deal with for now but not forever).

@JakobJingleheimer
Copy link
Member Author

Oow, what if it doesn't count towards code coverage? (Maybe too difficult to facilitate in implementation though 🤔)

@MoLow
Copy link
Member

MoLow commented Jan 13, 2026

I guess the current situation is limiting, but allowing to use retries - with user land retries that are pretty trivial to use?

it('may also take several times', { flaky: 100 }, () => {…});
```

When `flaky` is `true`, the test harness re-tries the suite or test-case up to the default number of times (eg 20), inclusive.
Copy link
Member

Choose a reason for hiding this comment

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

I would say that if we provide a default, we should also provide a way to define a global default. It could be a "phase 2" implementation, but I would suggest thinking about it!

(In any case I would also suggest defining an initial default of around 5 👀 )

Copy link
Member Author

Choose a reason for hiding this comment

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

Shall we do via the usual ENV + flag + configFile? I was hoping to crowd-source ideas for that 🙂

@JakobJingleheimer
Copy link
Member Author

@MoLow sorry, I don't understand your comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants