test: store nocks in a sqlite database#374
Merged
merceyz merged 8 commits intonodejs:mainfrom Feb 23, 2024
Merged
Conversation
bfacbd1 to
3264379
Compare
aduh95
reviewed
Feb 13, 2024
Contributor
aduh95
left a comment
There was a problem hiding this comment.
I wonder if this approach will not introduce a conflict-hell, if virtually all PRs will touch the same binary file.
71903e8 to
ec2872b
Compare
Member
Author
Yeah, that's the downside of this approach, any new nock will cause a conflict. |
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
8bdc7f9 to
b7f6f71
Compare
arcanis
approved these changes
Feb 20, 2024
Contributor
arcanis
left a comment
There was a problem hiding this comment.
That seems a good idea; slightly worried about the risk of conflicts too (especially if it breaks the "Update this PR" button in GH), but it's probably fine to try it and iterate as needed.
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
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.
Storing the nocks in a SQLite database enables easily sharing nocks between tests run in different processes in parallel.
This reduces the storage space needed for the nocks:
It avoids the
v8.serialize/v8.deserializeissues encountered in #365.The database is portable so the version of Node.js used to generate it doesn't matter.