try a fix for “TempDir RemoveAll cleanup”

This commit is contained in:
Chris Ziogas 2024-03-28 20:09:00 +02:00
parent 6e7f5bcd05
commit 91260a7c29
No known key found for this signature in database
GPG key ID: 2329CF479E36E2DA

View file

@ -530,6 +530,7 @@ func testSupplyTracer(t *testing.T, genesis *core.Genesis, gen func(*core.BlockG
traceOutputPath := filepath.ToSlash(t.TempDir()) traceOutputPath := filepath.ToSlash(t.TempDir())
traceOutputFilename := path.Join(traceOutputPath, "supply.jsonl") traceOutputFilename := path.Join(traceOutputPath, "supply.jsonl")
defer os.Remove(traceOutputFilename)
// Load supply tracer // Load supply tracer
tracer, err := tracers.LiveDirectory.New("supply", json.RawMessage(fmt.Sprintf(`{"path":"%s"}`, traceOutputPath))) tracer, err := tracers.LiveDirectory.New("supply", json.RawMessage(fmt.Sprintf(`{"path":"%s"}`, traceOutputPath)))