-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Reduce maxSize and minSuccessful in Scalacheck params #952
Conversation
Current coverage is
|
This build passed the first time (after I fixed my compile error :|). I'm going to restart it and see if it succeeds again. |
This build succeeded twice in a row. We might want to do something like this. We can tweak the parameters as others see fit. I'm not too concerned about how much this will reduce test cases because:
|
LGTM 👍 |
@@ -20,8 +20,11 @@ trait TestSettings extends Configuration with Matchers { | |||
|
|||
lazy val checkConfiguration: PropertyCheckConfiguration = | |||
PropertyCheckConfiguration( | |||
minSuccessful = if (Platform.isJvm) PosInt(100) else PosInt(10), | |||
maxDiscardedFactor = if (Platform.isJvm) PosZDouble(5.0) else PosZDouble(50.0)) | |||
minSuccessful = if (Platform.isJvm) PosInt(5) else PosInt(5), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, but the if expression is doing nothing here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikejcurry thanks for catching my hastiness :). Fixed.
This is an experiment to see if builds time out less if we don't run as many samples with Scalacheck.
cc3e95e
to
8608018
Compare
That's 3 passed builds in a row on this ticket I think. :-) - FWIW, I say 👍 - lot's of PRs with failed builds at the moment and this could resolve a lot of them. It might also make sense to have an issue recorded to revisit and see if there is somewhere in between 5 and 100 that works - I guess the more tests run in a single run the better, so somewhere in between, there might be a sweet spot :-) |
Some changes on the scala.js side have improved the failing build situation a lot. I think there is still benefit in something like this but we might not want quite as drastic of a reduction as I had previously made. |
To be honest my vote would be to drop Scala.js from the Travis CI builds and check it locally before releases. That's annoying, but it would cut two-thirds (or more) of the time off of PR builds and eliminate the flakiness. I'd be a little worried about ScalaCheck hitting the same cases most of the time for some types with |
@travisbrown I can see your argument for dropping scala.js from the Travis builds. It makes me a bit nervous, though. I don't want us to get into a situation where a PR is merged and then months later when we go to do a release we realize that approach isn't going to work at all in the scala.js world. Would there be a way to avoid that? For now I've used |
@@ -12,8 +13,10 @@ object eq { | |||
* and comparing the application of the two functions. | |||
*/ | |||
implicit def function1Eq[A, B](implicit A: Arbitrary[A], B: Eq[B]): Eq[A => B] = new Eq[A => B] { | |||
val sampleCnt: Int = if (Platform.isJvm) 50 else 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to keep the JVM side at 100? Is there example builds where this has failed for lack of output when building the JVM side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fair question. When I wrote this my thought process was that these tests run (presumably with a different RNG seed) on every PR and every merge to master, so 50 samples should be plenty, especially given the general nature of cats. I thought this might just speed things up a bit. I don't have any strong opinions on this and am happy to change it if people would prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikejcurry I'm going to go ahead and merge this PR to help make the build reliable. Feel free to open up a followup issue if you have any concerns about this lower number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ceedubs - I've no strong feelings. I just wanted to raise the question, and the build speed is a good argument as the cats end to end build has certainly gotten longer. I just wanted to raise the question. :-)
I think we should do this. Making sure the JS tests run is important (and we should be running the tests manually e.g. before a release) but for Travis I think this is a better default. |
👍 |
This is an experiment to see if builds time out less if we don't run as
many samples with Scalacheck.