From 6d489a1004dc3f7fa1ebffb66f6cebc2a0278fe7 Mon Sep 17 00:00:00 2001 From: Krasi Georgiev Date: Wed, 19 Dec 2018 12:40:47 +0300 Subject: [PATCH] fix TestWALSegmentSizeOption for windows. (#482) Signed-off-by: Krasi Georgiev --- db_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db_test.go b/db_test.go index 0ed4356cc3..691c73e4e2 100644 --- a/db_test.go +++ b/db_test.go @@ -707,7 +707,9 @@ func TestWALSegmentSizeOption(t *testing.T) { testutil.Ok(t, app.Commit()) } - files, err := ioutil.ReadDir(filepath.Join(db.Dir(), "wal")) + dbDir := db.Dir() + db.Close() + files, err := ioutil.ReadDir(filepath.Join(dbDir, "wal")) testutil.Assert(t, len(files) > 1, "current WALSegmentSize should result in more than a single WAL file.") testutil.Ok(t, err) for i, f := range files {