mirror of
https://github.com/prometheus/prometheus.git
synced 2026-06-04 06:02:13 -04:00
Merge pull request #14649 from machine424/ftest
fix(tsdb/db_test.go): close the corrupted chunk after creating it to satisfy Windows FS
This commit is contained in:
commit
87dccb1d1b
1 changed files with 2 additions and 1 deletions
|
|
@ -2690,8 +2690,9 @@ func TestDBReadOnly_Querier_NoAlteration(t *testing.T) {
|
|||
require.NoError(t, db.Close())
|
||||
|
||||
// Simulate a corrupted chunk: without a header.
|
||||
_, err := os.Create(path.Join(mmappedChunksDir(db.dir), "000001"))
|
||||
chunk, err := os.Create(path.Join(mmappedChunksDir(db.dir), "000001"))
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, chunk.Close())
|
||||
|
||||
spinUpQuerierAndCheck(db.dir, t.TempDir(), 1)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue