Skip to content

Commit

Permalink
test: fix order of index teardown (influxdata#22038)
Browse files Browse the repository at this point in the history
  • Loading branch information
lesam authored and chengshiwen committed Aug 11, 2024
1 parent 0a3a935 commit 0858af3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tsdb/index/tsi1/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,10 +573,13 @@ func (idx Index) Open() error {
// Close closes and removes the index directory.
func (idx *Index) Close() error {
defer os.RemoveAll(idx.Path())
if err := idx.Index.Close(); err != nil {
return err
}
if err := idx.SeriesFile.Close(); err != nil {
return err
}
return idx.Index.Close()
return nil
}

// Reopen closes and opens the index.
Expand Down

0 comments on commit 0858af3

Please sign in to comment.