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

Tests/benchmarks should clean up after themselves #553

Merged
merged 1 commit into from May 1, 2015

Conversation

mreiferson
Copy link
Member

There are many tests that drop tempfiles directly into os.TempDir() and don't delete them. Instead, these tests should do this:

tempDir, err := ioutil.TempDir("", "nsq-some-desc-here")
if err != nil {
  t.Fatal(err)
}
defer os.RemoveAll(tempDir)

I discovered this by finding that /tmp has 21GB of nsq data data in it.

I'll try to send over a PR for this.

@mreiferson
Copy link
Member

RFR @jehiah @cespare

jehiah added a commit that referenced this pull request May 1, 2015
Tests/benchmarks should clean up after themselves
@jehiah jehiah merged commit 9e74e8c into nsqio:master May 1, 2015
@mreiferson mreiferson deleted the test_cleanup_553 branch May 1, 2015 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants