typelevel / cats-effect

The pure asynchronous runtime for Scala
https://typelevel.org/cats-effect/
Apache License 2.0
2.03k stars 521 forks source link

Flakiness in `SchedulerSpec` #3974

Open djspiewak opened 9 months ago

djspiewak commented 9 months ago
[error]   x correctly calculate real time
[error]    16 is greater than 10 (/home/runner/work/cats-effect/cats-effect/tests/js/target/scala-3.2.2/cats-effect-tests-test-fastopt/file:/Users/etorreborre/projects/specs2/specs2-cross/matcher/shared/src/main/scala/org/specs2/matcher/Expectable.scala:50)

Seen in CI.

armanbilge commented 9 months ago

To give some context: we have to do some shenanigans to get micro-second precision time on JS and that test verifies that we didn't screw up the math and it works as we expect. Maybe need to make it less sensitive. https://github.com/typelevel/cats-effect/blob/85d6f3c86a345d179589414dfbb5bd33e0432702/core/js/src/main/scala/cats/effect/unsafe/SchedulerCompanionPlatform.scala#L75-L77