- Notifications
You must be signed in to change notification settings - Fork943
test: unit test to excercise polluted file cache with error#18491
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
good test to have, but not sure if you're still working on this? |
@aslilac the test is failing and I did not solve it yet. Just posted the test to show you |
go func() { | ||
_, err := cache.Acquire(ctx, fileID) | ||
assert.ErrorIs(t, err, context.Canceled) | ||
wg.Done() | ||
}() | ||
// Second call, that should succeed | ||
go func() { | ||
fs, err := cache.Acquire(ctx, fileID) | ||
assert.NoError(t, err) | ||
if fs != nil { | ||
fs.Close() | ||
} | ||
wg.Done() | ||
}() |
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.
Maybe we should check that 1 error comes back, and 1 succeeds.
Good comment from@aslilac
No description provided.