typelevel / typelevel/cats-effect
Flaky `DispatcherSpec` on JS
Open
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 2.2k
- Forks
- 576
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 18
Description
[info] ==> X cats.effect.std.DispatcherSuite.sequential dispatcher (cancelable = false) - await = true - report exception if raised during unsafeRunAndForget 3.071s munit.ComparisonFailException: tests/shared/src/test/scala/cats/effect/std/DispatcherSuite.scala:452
[info] 451: IO.fromFutureCancelable(IO((t.future, IO.unit))).timeoutTo(3.second, IO.pure(false)))
[info] 452: .flatMap(t => IO(assertEquals(t, true)))
[info] 453: }
[info] values are not the same
[info] => Obtained
[info] false
[info] => Diff (- expected, + obtained)
[info] -true
https://github.com/typelevel/cats-effect/actions/runs/20564823931/job/59061291706
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 tests/shared/src/test/scala/cats/effect/std/DispatcherSuite.scala, especially the assertion at line 452, and reproduce the sequential dispatcher case on the JS target from the linked CI failure. Compare repeated runs to determine why the future resolves false instead of true; done means the test no longer flakes and the expected assertion passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, scala
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100