fix TestWALSegmentSizeOption for windows. (#482)

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
This commit is contained in:
Krasi Georgiev 2018-12-19 12:40:47 +03:00 committed by GitHub
parent 22e3aeb107
commit 6d489a1004
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {