-
Notifications
You must be signed in to change notification settings - Fork 366
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
Test non-empty StorageIDs #8698
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THANKS! Much needed unit tests. But we might need more; these might be in a future PR, but then this PR has to say that and we need a more specific issue.
- Not sure how this tests CreateRepository.
- Don't we need to update other tests? E.g. graveler_v2_test.go appears to pass empty storage IDs; there may be others.
Blocking on these 3 issues (including the one on catalog_test.go). Entirely possible I misunderstood, and will happily unblock.
@@ -35,16 +36,16 @@ func TestManager_WriteRange(t *testing.T) { | |||
}{ | |||
{ | |||
name: "iterator_exhausted", | |||
initStorageID: "", | |||
writeStorageID: "", | |||
initStorageID: config.SingleBlockstoreID, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what we did in this test, but also what we did in the other test files. I would have expected to have twice as many test cases: once for "" aka SIngleBlockstoreID, one for "sid1". (This could have happened with nested test.Run()
s, of course.) But instead some test cases switch to testing "", others to "sid1". And I don't understand why.
Obviously I don't understand this for all changes in this file, not only for this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can understand, we're trying to make sure StorageID
flows properly from start to finish. By starting with either "" or "sid*" on one side, and making sure we're getting the same result in the other end, we have some confidence it's being passed properly, no?
@@ -37,3 +39,9 @@ func InitGravelerTest(t *testing.T) *GravelerTest { | |||
|
|||
return test | |||
} | |||
|
|||
// ShortenBranchUpdateBackOff upgrade graveler branch update back-off to shorten test duration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found out the graveler tests were way too slow -
Ended up adding this function to this PR.
Probably belongs to a separate one, but I think we can handle this.
(Anyway, this cuts running time from 90 seconds to only 8.)
Thanks @arielshaqed fro your review!
|
Closes #8697.
Change Description
In order to provide better coverage:
config.SingleBlockstoreID
.