Skip to content

Conversation

@mondeja
Copy link

@mondeja mondeja commented Oct 24, 2025

This is a test fix.

Summary

Fix flaky test that depends on current minute number.

Context

Sometimes, the Cucumber tests suite fails on GitHub Actions at the scenario Use site.time variable. For example, see this run: https://github.com/jekyll/jekyll/actions/runs/17277324576/job/49037269833#step:5:473

I've tracked down the problem and can reproduce it locally executing:

while bash script/cucumber features/site_data.feature:34; do :; done

In one or two minutes at most, the test eventually fails.

It's flaky because it depends on the concordance of the current minute before and after the build. The build takes, in my local environment, from ~150 ms to 1s, so the medium probablity of failure is ~1%.

The fix proposes the usage of a time range with 5 seconds of tolerance. The unused helper functions have been removed.

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.

2 participants