Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to Clock[F].instantNow in 2.3.1 #1592

Closed
jbwheatley opened this issue Jan 12, 2021 · 0 comments
Closed

Change to Clock[F].instantNow in 2.3.1 #1592

jbwheatley opened this issue Jan 12, 2021 · 0 comments
Labels

Comments

@jbwheatley
Copy link

change due to #1461

More of a PSA for anyone else who suddenly got tests failing when upgrading to CE 2.3.1. If you had something like this in your test suites:

private val mockClock: Clock[IO] = new Clock[IO] {
      def realTime(unit: TimeUnit): IO[Long]  = IO(123456L)
      def monotonic(unit: TimeUnit): IO[Long] = IO(123456L)
}

and anything you are testing used Clock[F].instantNow to give the current time as an instant, it now gives you EPOCH + 123456 nanos, not EPOCH + 123456millis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants