Skip to content
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

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Oct 31, 2024

Summary

This PR cleans the models tests a bit in preparation of submitting the partial-write-error implementation. No functional changes...

Checklist

  • No AI generated code was used in this PR

Related issues

@telegraf-tiger telegraf-tiger bot added the test label Oct 31, 2024
@srebhan srebhan force-pushed the model_test_cleanup branch from dbed43e to edf5408 Compare October 31, 2024 19:40
@srebhan srebhan self-assigned this Nov 4, 2024
@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Nov 4, 2024
@srebhan srebhan assigned DStrand1 and unassigned srebhan Nov 4, 2024
path := t.TempDir()
walfile, err := wal.Open(filepath.Join(path, "123"), nil)
require.NoError(t, err)
defer walfile.Close()
Copy link
Member

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?

Copy link
Member Author

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...

@DStrand1 DStrand1 assigned srebhan and unassigned DStrand1 Nov 5, 2024
@srebhan srebhan assigned DStrand1 and unassigned srebhan Nov 5, 2024
@DStrand1 DStrand1 merged commit ddec937 into influxdata:master Nov 5, 2024
27 checks passed
@github-actions github-actions bot added this to the v1.32.3 milestone Nov 5, 2024
srebhan added a commit that referenced this pull request Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants