typelevel / typelevel/cats-effect

Flaky `DispatcherSpec` on JS

Open
#4,541 0 comments 0 reactions 0 assignees View on GitHub

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.