tests: speed up new tests a little
Before: ok github.com/rfjakob/gocryptfs/tests/matrix 18.560s After: ok github.com/rfjakob/gocryptfs/tests/matrix 13.425s
This commit is contained in:
parent
8cad0e2f4f
commit
24036ab89f
@ -26,7 +26,7 @@ func TestConcurrentReadWrite(t *testing.T) {
|
||||
}
|
||||
buf := make([]byte, 100)
|
||||
content := []byte("1234567890")
|
||||
threads := 30
|
||||
threads := 10
|
||||
loops := 30
|
||||
for i := 0; i < threads; i++ {
|
||||
// Reader thread
|
||||
@ -80,7 +80,7 @@ func TestConcurrentReadWrite(t *testing.T) {
|
||||
func TestConcurrentReadCreate(t *testing.T) {
|
||||
fn := test_helpers.DefaultPlainDir + "/TestConcurrentReadCreate"
|
||||
content := []byte("1234567890")
|
||||
loops := 1000
|
||||
loops := 100
|
||||
var wg sync.WaitGroup
|
||||
// "Creater" thread
|
||||
wg.Add(1)
|
||||
|
@ -151,7 +151,7 @@ func TestWrite10Tight(t *testing.T) {
|
||||
path := test_helpers.DefaultPlainDir + "/TestWrite10Tight"
|
||||
content := make([]byte, 10)
|
||||
buf := make([]byte, 100)
|
||||
for i := 0; i < 1000; i++ {
|
||||
for i := 0; i < 100; i++ {
|
||||
file, err := os.Create(path)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
Loading…
Reference in New Issue
Block a user