mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-02 08:31:11 -08:00
fix(tsdb/db_test.go): close the corrupted chunk after creating it to satisfy Windows FS
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
This commit is contained in:
parent
616038f2b6
commit
82f38d3e9a
|
@ -2690,8 +2690,9 @@ func TestDBReadOnly_Querier_NoAlteration(t *testing.T) {
|
||||||
require.NoError(t, db.Close())
|
require.NoError(t, db.Close())
|
||||||
|
|
||||||
// Simulate a corrupted chunk: without a header.
|
// 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, err)
|
||||||
|
require.NoError(t, chunk.Close())
|
||||||
|
|
||||||
spinUpQuerierAndCheck(db.dir, t.TempDir(), 1)
|
spinUpQuerierAndCheck(db.dir, t.TempDir(), 1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue