RavenDB-27141 Seed test databases from a .ravendbdump - #23
Open
poissoncorp wants to merge 1 commit into
Open
poissoncorp wants to merge 1 commit into
poissoncorp wants to merge 1 commit into
Conversation
The client shipped a smuggler in 7.2.6, so DatabaseDumpFilePath and DatabaseDumpFileStream can finally be ported. The stream hook is asked once per driver and rewound between databases, which C# does not do.
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.
Closes the last gap against
src/Raven.TestDriver:DatabaseDumpFilePathandDatabaseDumpFileStream. It was blocked on the client having no smuggler, whichravendb7.2.6 shipped.72 tests, nothing skipped.
New features
Seed every test database from a dump
Writing fixture documents by hand in
setup_databasestops being the only option. Point the driver at a.ravendbdumpand every database it creates is imported from it, beforesetup_databaseruns.database_dump_file_stream()takes an open binary stream instead of a path, for a fixture that ships inside a package:The driver asks that hook once per driver, rewinds the stream between databases, and closes it when the driver closes. C# re-reads the virtual property, so a getter returning a fresh stream leaks one per store and disposes only the last; asking once avoids that.
Produce a dump from a database you already have:
Breaking changes
The client floor moves to 7.2.6
store.smugglerdoes not exist before it.A suite pinned to an older
ravendbkeeps the previous test driver release; nothing else in this version needs 7.2.6.Verification
driver.close().black --checkclean, labs 02, 03 and 05 pass.