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

Interval Spec Failure #247

Open
swalker2m opened this issue Dec 11, 2020 · 3 comments
Open

Interval Spec Failure #247

swalker2m opened this issue Dec 11, 2020 · 3 comments

Comments

@swalker2m
Copy link
Contributor

[info] - ToFullDays *** FAILED ***
1467
[info]   TestFailedException was thrown during property evaluation.
1468
[info]     Message: allDay.diff(i).forall(((x$9: lucuma.core.math.Interval) => IntervalSpec.this.catsSyntaxPartialOrder[java.time.Duration](x$9.duration)(io.chrisdavenport.cats.time.`package`.durationInstances).<(java.time.Duration.ofDays(1L)))) was false
1469
[info]     Location: (IntervalSpec.scala:332)
1470
[info]     Occurred when passed generated values (
1471
[info]       arg0 = Interval(1986-03-29T21:00:00Z,2020-10-24T15:07:27.728940353Z),
1472
[info]       arg1 = Europe/Sarajevo,
1473
[info]       arg2 = 16:28:37.068273398
1474
[info]     )
@swalker2m swalker2m changed the title Interval Spec Failsure Interval Spec Failure Dec 11, 2020
@swalker2m
Copy link
Contributor Author

==> X lucuma.core.math.IntervalSuite.ToFullDays 0.24s munit.FailException: /Users/swalker/dev/lucuma-core/modules/tests/shared/src/test/scala/lucuma/core/math/IntervalSuite.scala:332 assertion failed
331:      assertEquals(end, end.`with`(t))
332:      assert(allDay.diff(i).forall(_.duration < Duration.ofDays(1)))
333:    }
  | => lucuma.core.math.ScheduleSuite 30s
Failing seed: A9S1xuZ02MoA5NYyqPAHXbdCUs2aq6An3dfU09yfReJ=
You can reproduce this failure by adding the following override to your suite:

  override val scalaCheckInitialSeed = "A9S1xuZ02MoA5NYyqPAHXbdCUs2aq6An3dfU09yfReJ="

Falsified after 78 passed tests.
> ARG_0: Interval(1995-03-12T03:00:00Z,2002-06-05T15:03:41.666582883Z)
> ARG_1: America/Santiago
> ARG_2: 23:57:02.329089849

@cquiroz
Copy link
Collaborator

cquiroz commented Aug 10, 2021

Is this fixed by the switch to spire's Interval?

@rpiaggio
Copy link
Contributor

Not necessarily, since we still implement toFullDays. The seed that resulted in the error will probably not reproduce the issue though.

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

No branches or pull requests

3 participants