From 3ee0549106a391d23c6fd7aa0cf7baac1ce81fee Mon Sep 17 00:00:00 2001 From: Bo Du Date: Thu, 28 Feb 2019 17:34:02 -0500 Subject: [PATCH] Remove data in close method. --- integration/setup.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/integration/setup.go b/integration/setup.go index 683bc38..2ed8032 100644 --- a/integration/setup.go +++ b/integration/setup.go @@ -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 {