Speed up concurrency tests
This commit is contained in:
parent
aaf57943fc
commit
e99ccdab9c
|
@ -109,7 +109,7 @@ func testStoreConcurrencyWorker(wg *sync.WaitGroup, t *testing.T, store *Store,
|
|||
if err == nil {
|
||||
break
|
||||
} else {
|
||||
time.Sleep(time.Duration(10000 * (rand.Int31()%300 + 10)))
|
||||
time.Sleep(time.Duration(1000 * (rand.Int31()%20 + 5)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -121,8 +121,7 @@ func testStoreConcurrencyHelper(t *testing.T, drv StoreDriver, workers, rounds i
|
|||
|
||||
s, err := store.Create("0.1.2")
|
||||
if err != nil {
|
||||
t.Error("Create() failed")
|
||||
return
|
||||
t.Fatal("Create() failed")
|
||||
}
|
||||
wg.Add(workers)
|
||||
for i := 0; i < workers; i++ {
|
||||
|
@ -145,7 +144,7 @@ func testStoreConcurrencyHelper(t *testing.T, drv StoreDriver, workers, rounds i
|
|||
|
||||
func TestStore_Concurrency_Mem(t *testing.T) {
|
||||
drv, _ := NewMemStore()
|
||||
testStoreConcurrencyHelper(t, drv, 5, 50000)
|
||||
testStoreConcurrencyHelper(t, drv, 5, 40000)
|
||||
}
|
||||
|
||||
func TestStore_Concurrency_FS(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue