typelevel / typelevel/weaver-test

`MutableSuiteTest` is flaky

Open
#201 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.