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
fix test store delete collection function failed #121780
fix test store delete collection function failed #121780
Conversation
/assign @wojtek-t |
@@ -2042,6 +2042,9 @@ func TestStoreDeleteCollection(t *testing.T) { | |||
storeWithCounter := &storageWithCounter{Interface: registry.Storage.Storage} | |||
registry.Storage.Storage = storeWithCounter | |||
deleteCollectionPageSize = 2 | |||
defer func() { | |||
deleteCollectionPageSize = int64(10000) | |||
}() |
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.
Great finding. Instead of setting 10000 value here, can you please restore to the value to which it was set before?
So sth like:
originalDeleteCollectionPageSize = deleteCollectionPageSize
deleteCollectionPageSize = 2
defer func() {
deleteCollectionPageSize = originalDeleteCollectionPageSize
}()
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.
all right!
/priority important-longterm |
870f830
to
b12db6d
Compare
/lgtm /milestone v1.29 |
/retest |
LGTM label has been added. Git tree hash: 63a4664f482992dfa4c9a83033866d444ea85a72
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: HirazawaUi, wojtek-t The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/triage accepted |
What type of PR is this?
/kind failing-test
What this PR does / why we need it:
Once we make the GetList in DeleteCollection respect the timeout context, here's what makes the other test functions fail
Which issue(s) this PR fixes:
Fixes #121627
Special notes for your reviewer:
deleteCollectionPageSize = 2
will overwrite the value of the global variable deleteCollectionPageSize, causing other tests to fail, so after we execute this test function, we reset it to its default valueint64(10000)
Does this PR introduce a user-facing change?