From a7eb1e18847148ec5b6a3e9ae6ee6ee0efdc3853 Mon Sep 17 00:00:00 2001 From: silentsai Date: Wed, 4 Jun 2014 14:29:21 +0800 Subject: [PATCH] for test cases : do remove db file instead of call function db.clear at the very start --- ledis/ledis_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ledis/ledis_test.go b/ledis/ledis_test.go index e0f812d..902d545 100644 --- a/ledis/ledis_test.go +++ b/ledis/ledis_test.go @@ -1,6 +1,7 @@ package ledis import ( + "os" "sync" "testing" ) @@ -27,14 +28,16 @@ func getTestDB() *DB { } } `) + + os.RemoveAll("/tmp/testdb") + os.RemoveAll("/tmp/testdb_binlog") + var err error testLedis, err = Open(d) if err != nil { println(err.Error()) panic(err) } - - testLedis.ldb.Clear() } testLedisOnce.Do(f)