diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2021-06-18 14:57:18 +0200 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2021-06-18 14:57:18 +0200 |
commit | 9f2c63676d93a1fe1cf836f1ae125fa5fb566039 (patch) | |
tree | d7ae04044a81c18c7f250d4e93114f3008b452f4 /stackless | |
parent | fix: set content-length properly when StreanRequestBody was enabled (#1049) (diff) | |
download | fasthttp-9f2c63676d93a1fe1cf836f1ae125fa5fb566039.tar.gz fasthttp-9f2c63676d93a1fe1cf836f1ae125fa5fb566039.tar.bz2 fasthttp-9f2c63676d93a1fe1cf836f1ae125fa5fb566039.zip |
Lower go test time
Diffstat (limited to 'stackless')
-rw-r--r-- | stackless/func_test.go | 4 | ||||
-rw-r--r-- | stackless/writer_test.go | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/stackless/func_test.go b/stackless/func_test.go index 4f2c492..02ef2b8 100644 --- a/stackless/func_test.go +++ b/stackless/func_test.go @@ -8,6 +8,8 @@ import ( ) func TestNewFuncSimple(t *testing.T) { + t.Parallel() + var n uint64 f := NewFunc(func(ctx interface{}) { atomic.AddUint64(&n, uint64(ctx.(int))) @@ -25,6 +27,8 @@ func TestNewFuncSimple(t *testing.T) { } func TestNewFuncMulti(t *testing.T) { + t.Parallel() + var n1, n2 uint64 f1 := NewFunc(func(ctx interface{}) { atomic.AddUint64(&n1, uint64(ctx.(int))) diff --git a/stackless/writer_test.go b/stackless/writer_test.go index 95ebc31..9c4748e 100644 --- a/stackless/writer_test.go +++ b/stackless/writer_test.go @@ -12,12 +12,16 @@ import ( ) func TestCompressFlateSerial(t *testing.T) { + t.Parallel() + if err := testCompressFlate(); err != nil { t.Fatalf("unexpected error: %s", err) } } func TestCompressFlateConcurrent(t *testing.T) { + t.Parallel() + if err := testConcurrent(testCompressFlate, 10); err != nil { t.Fatalf("unexpected error: %s", err) } @@ -36,12 +40,16 @@ func testCompressFlate() error { } func TestCompressGzipSerial(t *testing.T) { + t.Parallel() + if err := testCompressGzip(); err != nil { t.Fatalf("unexpected error: %s", err) } } func TestCompressGzipConcurrent(t *testing.T) { + t.Parallel() + if err := testConcurrent(testCompressGzip, 10); err != nil { t.Fatalf("unexpected error: %s", err) } |