mirror of https://github.com/ledisdb/ledisdb.git
for test cases : do remove db file instead of call function db.clear at the very start
This commit is contained in:
parent
0d4949f060
commit
a7eb1e1884
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue