-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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(models): Cleanup tests, unexport stuff and unify naming in tests #16116
Conversation
dbed43e
to
edf5408
Compare
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 👍 This pull request doesn't change the Telegraf binary size 📦 Click here to get additional PR build artifactsArtifact URLs |
path := t.TempDir() | ||
walfile, err := wal.Open(filepath.Join(path, "123"), nil) | ||
require.NoError(t, err) | ||
defer walfile.Close() |
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.
This defer should be unneeded since its explicitly called later right?
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.
No I don't think it is unnecessary because the test can fail in between (with the require
calls) and the file would be left open. So the double close should be fine to not leak anything...
Summary
This PR cleans the
models
tests a bit in preparation of submitting the partial-write-error implementation. No functional changes...Checklist
Related issues