-
Notifications
You must be signed in to change notification settings - Fork 134
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
Feature/pull request: Reseed Id's #38
Comments
Oh that's interesting. I don't know if other databases support this kind of thing, maybe it could be exposed through some kind of options object? |
After some quick googling it seems to be possible in both MySQL and Oracle. Regarding temporal tables, those were new to me. I guess there might be issues with reseeding those. I'll keep them in mind. |
Oh I dunno about reseeding those. I just meant that there are database that
might want to do additional metadata queries and deletion steps
…On Wed, Jan 31, 2018 at 8:28 AM, robertmantissa ***@***.***> wrote:
After some quick googling it seems to be possible in both MySQL and Oracle.
I will create a fork and add the SQL Server functionality first, and we'll
take it from there.
Regarding temporal tables, those were new to me. I guess there might be
issues with reseeding those. I'll keep them in mind.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#38 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAGYMhWYYJ0ZPnLgqNdYZBqTKkNWDGMOks5tQHiRgaJpZM4R0ADt>
.
|
Got it, haven't bothered with temporal tables at all, so chances are that those won't work.
to keep the current api) |
Hi, We had problems with randomly failing tests.. I was struggling almost 2 days until I've found out that the problem is with Respawn and Identity value when tests are run in appropriate order. Then I've run into this pull request! For my team changes that @robertmantissa proposed are crucial to be able to still use Respawn with ease. Please consider this @jbogard . Important note: code prepared by @robertmantissa not covers scenario when table has custom IDENTITY SEED initial value. For example 1000 instead of 1. I had problems with it, so I've added fix to the @robertmantissa code and created pull request to his fork. Please check it out here: pull request Right now I have to use locally compiled version of respawn which includes @robertmantissa and my changes, but I would like to go back to yours nugget package as soon as possible. |
Solved with pull request #40 |
Hey!
I've added Respawn in an existing acceptance test project that dropped, recreated and migrated the database between every test. (With some 600 tests, the time saved using Respawn is almost two hours)
But in this specific project, since the all the tables were dropped, all id-columns were reset between every test. I ran into all kinds of contraint-issues and even some of the asserts expected certain id values.
Instead of fixing hundreds of failing tests I did a DBCC CHECKIDENT reseed on all tables needed. After some issues with some unexpected behavior with that command, this actually works fine. And it's fast.
The result is that the database is truly in the same state after each checkpoint.Reset()
Anyone interested in this as feature in Respawn? I can repackage this into a pull request if anyone is. (Only for SQL-Server, now at least)
The text was updated successfully, but these errors were encountered: