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

Reproducible test control via ScalaCheck seed #118

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

armanbilge
Copy link
Owner

Derives the Cats Effect test control seed for executeEmbed from the ScalaCheck seed.

I'm hoping this will help with #101 which so far only seems to fail in CI.

@armanbilge
Copy link
Owner Author

Ho ho!

==> X calico.frp.SignalSuite.Signal: monad (stack-unsafe).semigroupal associativity  2.637s munit.FailException: /home/runner/work/calico/calico/frp/src/test/scala/calico/frp/SignalSuite.scala:99
98:   // it is stack-safe, but expensive to test
99:   checkAll("Signal", MonadTests[Signal[IO, _]].stackUnsafeMonad[Int, Int, Int])

Failing seed: kEL3o_sLzPuTKenyKh79U0L8htn0bKD5rVaU3ZhZakJ=
You can reproduce this failure by adding the following override to your suite:

  override val scalaCheckInitialSeed = "kEL3o_sLzPuTKenyKh79U0L8htn0bKD5rVaU3ZhZakJ="

Falsified after 72 passed tests.
> Labels of failing property: 
Expected: fs2.concurrent.Signal$$anon$2@3f33842
Received: fs2.concurrent.Signal$$anon$2@6b11218
> ARG_0: TestSignal(NonEmptyList((0 days,-2147483[64](https://github.com/armanbilge/calico/actions/runs/3655630905/jobs/6177171760#step:9:65)8), (50 milliseconds,-1277598221), (79 milliseconds,1), (148 milliseconds,-1519712488), (171 milliseconds,1), (177 milliseconds,2147483647), (239 milliseconds,-2147483648), (290 milliseconds,-2100517818), (303 milliseconds,-1), (371 milliseconds,-1), (402 milliseconds,-2147483648), (473 milliseconds,83574278), (526 milliseconds,1), (594 milliseconds,-1), (640 milliseconds,-723238359), ([65](https://github.com/armanbilge/calico/actions/runs/3655630905/jobs/6177171760#step:9:66)7 milliseconds,-1), (723 milliseconds,1577477699), (763 milliseconds,1), (771 milliseconds,-1), (815 milliseconds,310546745), (818 milliseconds,-627911421), (841 milliseconds,0), (904 milliseconds,-990004048), (951 milliseconds,-730277160), (996 milliseconds,-2147483648), (1051 milliseconds,-1387499205), (1064 milliseconds,1), (1127 milliseconds,-1758115767), (1187 milliseconds,1848942105), (1213 milliseconds,-1), (1268 milliseconds,1), (1306 milliseconds,-1), (1309 milliseconds,0), (1332 milliseconds,-168797151), (1388 milliseconds,860837862), (1399 milliseconds,-2147483648), (1409 milliseconds,-1), (1459 milliseconds,0), (1507 milliseconds,0), (1535 milliseconds,0), (1582 milliseconds,739138798), (1597 milliseconds,-1105792500), (1600 milliseconds,2147483647), (1670 milliseconds,-2147483648), (1725 milliseconds,1[66](https://github.com/armanbilge/calico/actions/runs/3655630905/jobs/6177171760#step:9:67)3095177), (1754 milliseconds,0), (1761 milliseconds,2147483647), (1806 milliseconds,0), (1817 milliseconds,-796910905), (1839 milliseconds,48843762), (1854 milliseconds,-2002364551), (1888 milliseconds,-1761928224), (1944 milliseconds,-383397730), (2008 milliseconds,-1163713650), (2054 milliseconds,-1071745474), (2079 milliseconds,1), (2123 milliseconds,2147483647), (2140 milliseconds,497436073), (2147 milliseconds,-1170909555), (2209 milliseconds,-348465409), (2244 milliseconds,0), (2306 milliseconds,2119079661), (2327 milliseconds,880765442), (2395 milliseconds,2070453592), (2449 milliseconds,2147483647)))
> ARG_1: TestSignal(NonEmptyList((0 days,0), (68 milliseconds,-28285281), (124 milliseconds,0), (132 milliseconds,363643256), (181 milliseconds,1424047800), (215 milliseconds,-1), (251 milliseconds,0), (294 milliseconds,490655878), (315 milliseconds,640353818), (326 milliseconds,1), (388 milliseconds,1), (392 milliseconds,1), (432 milliseconds,485873301), (470 milliseconds,1999705890), (492 milliseconds,-1028603858), (523 milliseconds,-1191026922), (555 milliseconds,-1890656915), (587 milliseconds,-437700868), (645 milliseconds,-1294779792), (699 milliseconds,-934559991), (715 milliseconds,1003749956), (761 milliseconds,-358701645), (819 milliseconds,0), (835 milliseconds,1), (860 milliseconds,2147483647), (879 milliseconds,1610660107), (903 milliseconds,70852953), (950 milliseconds,-1), (970 milliseconds,1), (986 milliseconds,-1651225243), (1019 milliseconds,1734781973), (1073 milliseconds,-980377[67](https://github.com/armanbilge/calico/actions/runs/3655630905/jobs/6177171760#step:9:68)8), (1091 milliseconds,-1928887149), (1126 milliseconds,2147483647), (1139 milliseconds,1337[68](https://github.com/armanbilge/calico/actions/runs/3655630905/jobs/6177171760#step:9:69)0332), (1181 milliseconds,-356781889), (1213 milliseconds,-1183929820), (1282 milliseconds,-2147483648), (1292 milliseconds,1), (1317 milliseconds,1355589996), (1375 milliseconds,-1), (1413 milliseconds,1), (1455 milliseconds,774104303), (1461 milliseconds,-125592300), (1468 milliseconds,-2147483648), (1478 milliseconds,2147483647), (1482 milliseconds,-1), (1528 milliseconds,-2147483648), (1559 milliseconds,1), (1611 milliseconds,-1), (1671 milliseconds,-1344742331), (1725 milliseconds,-1300327799), (1747 milliseconds,2147483647), (1808 milliseconds,122495854), (1876 milliseconds,0), (1934 milliseconds,1804[69](https://github.com/armanbilge/calico/actions/runs/3655630905/jobs/6177171760#step:9:70)0986), (1984 milliseconds,1), (2011 milliseconds,2147483647), (2071 milliseconds,[70](https://github.com/armanbilge/calico/actions/runs/3655630905/jobs/6177171760#step:9:71)1578093), (2106 milliseconds,1), (2165 milliseconds,-619095241), (2194 milliseconds,2147483647), (2238 milliseconds,-2147483648), (2254 milliseconds,1), (2281 milliseconds,-8[71](https://github.com/armanbilge/calico/actions/runs/3655630905/jobs/6177171760#step:9:72)076547)))
> ARG_2: TestSignal(NonEmptyList((0 days,788133511), (67 milliseconds,214[74](https://github.com/armanbilge/calico/actions/runs/3655630905/jobs/6177171760#step:9:75)83647), (91 milliseconds,-526163605), (129 milliseconds,2147483647), (177 milliseconds,-2147483648), (237 milliseconds,1415[75](https://github.com/armanbilge/calico/actions/runs/3655630905/jobs/6177171760#step:9:76)1354), (270 milliseconds,-9426[79](https://github.com/armanbilge/calico/actions/runs/3655630905/jobs/6177171760#step:9:80)380), (309 milliseconds,1540955941)))

@armanbilge
Copy link
Owner Author

Amazingly I still cannot reproduce this locally 🤯

@armanbilge armanbilge merged commit 81621c7 into series/0.1 Dec 9, 2022
@armanbilge armanbilge deleted the pr/test-control-reproducible branch December 9, 2022 08:49
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

Successfully merging this pull request may close these issues.

1 participant