Skip to content

Commit

Permalink
Remove data in close method.
Browse files Browse the repository at this point in the history
  • Loading branch information
notbdu committed Feb 28, 2019
1 parent 9064d51 commit 3ee0549
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions integration/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,15 @@ func (ts *testServerSetup) stopServer() error {
}
close(ts.doneCh)

// Remove data directory to prevent accumulation of data.
if err := os.RemoveAll(filepath.Join(ts.db.Options().FilePathPrefix(), "data")); err != nil {
return err
}

// Wait for graceful server shutdown.
<-ts.closedCh
return nil
}

func (ts *testServerSetup) close(t *testing.T) {
// TODO(wjang): Delete the database files as well.
// Remove data directory to prevent accumulation of data.
err := os.RemoveAll(filepath.Join(ts.db.Options().FilePathPrefix(), "data"))
require.NoError(t, err)
}

func loadConfig(t *testing.T, config string) configuration {
Expand Down

0 comments on commit 3ee0549

Please sign in to comment.