typelevel / typelevel/weaver-test
`MutableSuiteTest` is flaky
Open
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 85
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
The MutableSuiteTest for sleeping is flaky:
test("sleeping") {
for {
before <- CatsUnsafeRun.realTimeMillis
_ <- CatsUnsafeRun.sleep(1.seconds)
after <- CatsUnsafeRun.realTimeMillis
} yield expect(after - before >= 1000)
}
The test suite is run by DogFoodTests. This failed in Github Actions:
https://github.com/typelevel/weaver-test/actions/runs/17489340107/job/49675350638#step:10:135
[info] *************FAILURES**************
[info] weaver.framework.test.DogFoodTests
[info] - test suite reports successes events 3s
[info] weaver.framework.test.Meta$MutableSuiteTest:TestSelector(sleeping) failed with Failure (modules/framework-cats/shared/src/test/scala/DogFoodTests.scala:22)
[info]
[info] modules/framework-cats/shared/src/test/scala/DogFoodTests.scala:22
[info] case (_, events) => forEach(events)(isSuccess)
[info] ^
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the sleeping test in modules/framework-cats/shared/src/test/scala/MutableSuiteTest.scala and inspect how it is exercised by modules/framework-cats/shared/src/test/scala/DogFoodTests.scala. Reproduce the GitHub Actions failure if possible and verify that the sleeping test and DogFoodTests remain reliable across repeated runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100