diff --git a/db_test.go b/db_test.go
index <HASH>..<HASH> 100644
--- a/db_test.go
+++ b/db_test.go
@@ -2025,11 +2025,9 @@ func ExampleDB_Subscribe() {
 	// a-key is now set to a-value
 }
 
-func removeDir(dir string) func() {
-	return func() {
-		if err := os.RemoveAll(dir); err != nil {
-			panic(err)
-		}
+func removeDir(dir string) {
+	if err := os.RemoveAll(dir); err != nil {
+		panic(err)
 	}
 }
Fix removeDir function in tests. (#<I>)

All the usages of removeDir only called the function itself and not

the returned func. This change does away with the returned func, so

calling removeDir will remove the badger directories during the test.