Cleanup storage from all tests.

Fixed #3299
This commit is contained in:
Brian Brazil 2018-03-08 16:48:11 +00:00
parent c0ce35d2d3
commit bf7d87aed2
2 changed files with 3 additions and 0 deletions

View file

@ -36,6 +36,7 @@ func NewBenchmark(b *testing.B, input string) *Benchmark {
// Run runs the benchmark. // Run runs the benchmark.
func (b *Benchmark) Run() { func (b *Benchmark) Run() {
defer b.t.Close()
b.b.ReportAllocs() b.b.ReportAllocs()
b.b.ResetTimer() b.b.ResetTimer()
for i := 0; i < b.b.N; i++ { for i := 0; i < b.b.N; i++ {

View file

@ -204,6 +204,8 @@ load 10s
if err != nil { if err != nil {
t.Fatalf("unexpected error creating test: %q", err) t.Fatalf("unexpected error creating test: %q", err)
} }
defer test.Close()
err = test.Run() err = test.Run()
if err != nil { if err != nil {
t.Fatalf("unexpected error initializing test: %q", err) t.Fatalf("unexpected error initializing test: %q", err)