diff --git a/docstore/drivertest/driverbenchmark.go b/docstore/drivertest/driverbenchmark.go index ed3e23b1f0..4e6f5a5d3d 100644 --- a/docstore/drivertest/driverbenchmark.go +++ b/docstore/drivertest/driverbenchmark.go @@ -27,7 +27,7 @@ import ( // RunBenchmarks runs benchmarks for docstore drivers. func RunBenchmarks(b *testing.B, coll *docstore.Collection) { defer coll.Close() - clearCollection(b, coll) + ClearCollection(b, coll) b.Run("BenchmarkSingleActionPut", func(b *testing.B) { benchmarkSingleActionPut(10, b, coll) }) @@ -40,7 +40,7 @@ func RunBenchmarks(b *testing.B, coll *docstore.Collection) { b.Run("BenchmarkActionListGet", func(b *testing.B) { benchmarkActionListGet(100, b, coll) }) - clearCollection(b, coll) + ClearCollection(b, coll) } func benchmarkSingleActionPut(n int, b *testing.B, coll *docstore.Collection) { diff --git a/docstore/mongodocstore/mongo_test.go b/docstore/mongodocstore/mongo_test.go index ac2ef25e00..e7074a0b1a 100644 --- a/docstore/mongodocstore/mongo_test.go +++ b/docstore/mongodocstore/mongo_test.go @@ -238,6 +238,7 @@ func TestLowercaseFields(t *testing.T) { } coll := docstore.NewCollection(dc) defer coll.Close() + defer drivertest.ClearCollection(t, coll) type S struct { ID, F, G int