-
Notifications
You must be signed in to change notification settings - Fork 682
Optimise PBT seed files #4183
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
Merged
Merged
Optimise PBT seed files #4183
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Improve performance of property-based tests by avoiding file IO operations. - Don't eagerly delete seed files. Instead, create a list and delete them once the PBT has completed. - General tidying. - Now that performance is better, re-enabling PBT for 19, 20, 22 inputs. - Make `proptest()` a bit simpler - create new `onSuccess()` helper function. TODO move to a different PR: - GHA Cache .kotest dir - improve `beEmptyDirectory()` messages - Print PBT failure message in a single println (avoid splitting up the message over multiple lines, and avoid creating list)
- Print the failure message in a single `println()` to avoid splitting the message. - Directly create a string, and avoid creating intermediate lists.
…m/fix/optimise-pbt-seed-files # Conflicts: # kotest-property/src/commonMain/kotlin/io/kotest/property/internal/test.kt
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jul 20, 2024
- Print the failure message in a single `println()` to avoid splitting the message. - Directly create a string, and avoid creating intermediate lists. The actual message content has not changed. This PR only affects how the string is built. Split out from #4183 Co-authored-by: Sam <sam@sksamuel.com>
- remove old code - tidy up kdoc - deprecate `*IfEnabled()` functions, and just always check if seed writing is enabled - remove unnecessary `@file:Suppress("NOTHING_TO_INLINE")` - remove `testPathsValueCache` - there's no need now that seed-file management is only done once per test
…' into adam/fix/optimise-pbt-seed-files
aSemy
commented
Jul 20, 2024
Cache the `~/.kotest` directory in GHA actions. Currently, this only contains PBT seed files for tests that previously failed. I have two reasons for doing this: 1. We can dog-food the PBT seed files. 2. We can benefit from the PBT seed files.
…am/fix/optimise-pbt-seed-files
… into adam/fix/optimise-pbt-seed-files
sksamuel
approved these changes
Jul 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improve performance of property-based tests by avoiding file IO operations.
forAll
with 19, 20, 22 inputs.proptest()
a bit simpler - create newonSuccess()
helper function.@file:Suppress("NOTHING_TO_INLINE")
(helps with Building Kotest produces a lot of warnings, which make it difficult to identify problems #4085)Related