-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Load()
calculate hash of every table at the end and I don't know why
#203
Comments
Oh I see, it make sense for subsequent Do you think it make sense to make some flag to disable this behavior? In my case I use |
Hi @slsyy, We already have DangerousSkipCleanupFixtureTables. Can you try and see if it works for you? I'm not sure if it also skips the checksum computing for all tables, but if not it would make sense to fix that IMO. |
@andreynering this flag control that piece of code: Lines 420 to 430 in b1fe75b
where I want to skip this: Line 460 in b1fe75b
Reason: In my code I use this library in such a way: fixtures, err := testfixtures.New(...)
handleErr(t, err)
handleErr(fixtures.Load());
// and fixtures object dies here so I basically don't need all of those hashes, because they won't be used anyway, if I don't call I can raise a PR, if it make sense |
@slsyy I'm not so sure if we could do the fix for the existing Anyway, feel free to open a PR with a proposal if you want to! |
v3.11.0
The last function call for
Load()
:testfixtures/testfixtures.go
Line 460 in b1fe75b
and postgres implementation
testfixtures/postgresql.go
Lines 362 to 376 in b1fe75b
Basically it iterates over the whole database (in my case it is 100+ tables) and calculate md5 hash of each table for no reason. Do I miss something or maybe it can be removed? In my case it slows down tests in noticeable way
The text was updated successfully, but these errors were encountered: