aboutsummaryrefslogtreecommitdiff
path: root/workerpool_test.go
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2019-10-16 01:59:56 +0200
committerGravatar Erik Dubbelboer <erik@dubbelboer.com> 2019-10-16 10:20:13 +0200
commitc3d82ca3a430260ff1795abfeac9e8396ed6f6fe (patch)
treedde63ec5b5f22388ef65a12ca7dc6bc131bee2d8 /workerpool_test.go
parentUse Fatal instead of Fatalf when no formatting used (diff)
downloadfasthttp-c3d82ca3a430260ff1795abfeac9e8396ed6f6fe.tar.gz
fasthttp-c3d82ca3a430260ff1795abfeac9e8396ed6f6fe.tar.bz2
fasthttp-c3d82ca3a430260ff1795abfeac9e8396ed6f6fe.zip
Speed up testing by running tests in parallel
Diffstat (limited to 'workerpool_test.go')
-rw-r--r--workerpool_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/workerpool_test.go b/workerpool_test.go
index 05e1be0..cdf01ab 100644
--- a/workerpool_test.go
+++ b/workerpool_test.go
@@ -10,10 +10,14 @@ import (
)
func TestWorkerPoolStartStopSerial(t *testing.T) {
+ t.Parallel()
+
testWorkerPoolStartStop(t)
}
func TestWorkerPoolStartStopConcurrent(t *testing.T) {
+ t.Parallel()
+
concurrency := 10
ch := make(chan struct{}, concurrency)
for i := 0; i < concurrency; i++ {
@@ -44,10 +48,14 @@ func testWorkerPoolStartStop(t *testing.T) {
}
func TestWorkerPoolMaxWorkersCountSerial(t *testing.T) {
+ t.Parallel()
+
testWorkerPoolMaxWorkersCountMulti(t)
}
func TestWorkerPoolMaxWorkersCountConcurrent(t *testing.T) {
+ t.Parallel()
+
concurrency := 4
ch := make(chan struct{}, concurrency)
for i := 0; i < concurrency; i++ {