Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Jun 23, 2025

No description provided.

@aslilac aslilac self-requested a review June 23, 2025 16:06
@aslilac
Copy link
Member

aslilac commented Jun 23, 2025

good test to have, but not sure if you're still working on this?

@Emyrk
Copy link
Member Author

Emyrk commented Jun 23, 2025

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

Comment on lines +65 to +79
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()
}()
Copy link
Member Author

@Emyrk Emyrk Jun 24, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants