Add mutex logging

This commit is contained in:
Audrius Butkevicius
2015-04-22 23:54:31 +01:00
parent 9ee3541655
commit 433b923ea7
31 changed files with 277 additions and 78 deletions

View File

@@ -10,10 +10,11 @@ import (
"crypto/rand"
"log"
"os"
"sync"
"testing"
"time"
"github.com/syncthing/syncthing/internal/sync"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/opt"
"github.com/syndtr/goleveldb/leveldb/util"
@@ -132,7 +133,7 @@ func TestConcurrentSetClear(t *testing.T) {
dur := 30 * time.Second
t0 := time.Now()
var wg sync.WaitGroup
wg := sync.NewWaitGroup()
os.RemoveAll("testdata/concurrent-set-clear.db")
db, err := leveldb.OpenFile("testdata/concurrent-set-clear.db", &opt.Options{OpenFilesCacheCapacity: 10})
@@ -188,7 +189,7 @@ func TestConcurrentSetOnly(t *testing.T) {
dur := 30 * time.Second
t0 := time.Now()
var wg sync.WaitGroup
wg := sync.NewWaitGroup()
os.RemoveAll("testdata/concurrent-set-only.db")
db, err := leveldb.OpenFile("testdata/concurrent-set-only.db", &opt.Options{OpenFilesCacheCapacity: 10})