summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-09-12 20:48:47 +0300
committerValery Piashchynski <[email protected]>2021-09-12 20:48:47 +0300
commit52c2330cbd126533d992d4b73b3f8e2f2e27f7bf (patch)
tree23ce0398ac1ab2f4eb35bab7612574b7a995fbc8
parent1318856028d2f771dd9c971e221c469d39601c74 (diff)
Run pipe tests in parallel
Update codecoverage Signed-off-by: Valery Piashchynski <[email protected]>
-rw-r--r--.vscode/settings.json53
-rw-r--r--[-rwxr-xr-x]Makefile3
-rw-r--r--manifest.json79
-rwxr-xr-xpkg/transport/pipe/pipe_factory_test.go17
4 files changed, 47 insertions, 105 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 1ec5af52..48749050 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,26 +1,29 @@
{
- "cSpell.words": [
- "addrs",
- "amqp",
- "amqpjobs",
- "boltdb",
- "gomemcache",
- "goridge",
- "hget",
- "hset",
- "INMEMORY",
- "memcachedkv",
- "memorykv",
- "mexpire",
- "mget",
- "prefetch",
- "proto",
- "SETEX",
- "srem",
- "stretchr",
- "unsub",
- "Upgrader",
- "websockets",
- "websocketsv"
- ]
-} \ No newline at end of file
+ "cSpell.words": [
+ "addrs",
+ "amqp",
+ "amqpjobs",
+ "boltdb",
+ "codecov",
+ "golangci",
+ "gomemcache",
+ "goridge",
+ "hget",
+ "hset",
+ "INMEMORY",
+ "memcachedkv",
+ "memorykv",
+ "mexpire",
+ "mget",
+ "prefetch",
+ "proto",
+ "SETEX",
+ "shivammathur",
+ "srem",
+ "stretchr",
+ "unsub",
+ "Upgrader",
+ "websockets",
+ "websocketsv"
+ ]
+}
diff --git a/Makefile b/Makefile
index ac995f5b..ab6d6c0b 100755..100644
--- a/Makefile
+++ b/Makefile
@@ -37,7 +37,8 @@ test_coverage:
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/metrics.out -covermode=atomic ./tests/plugins/metrics
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/resetter.out -covermode=atomic ./tests/plugins/resetter
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/rpc.out -covermode=atomic ./tests/plugins/rpc
- cat ./coverage-ci/*.out > ./coverage-ci/summary.out
+ echo 'mode: atomic' > ./coverage-ci/summary.txt
+ tail -q -n +2 ./coverage-ci/*.out >> ./coverage-ci/summary.txt
docker-compose -f tests/env/docker-compose.yaml down
test: ## Run application tests
diff --git a/manifest.json b/manifest.json
deleted file mode 100644
index fe2cae84..00000000
--- a/manifest.json
+++ /dev/null
@@ -1,79 +0,0 @@
-[
- {
- "title": "RoadRunner",
- "links": {
- "readme": "Table of Contents",
- "intro/about": "What is it?",
- "intro/features": "Features",
- "intro/install": "Installation",
- "intro/config": "Configuration Reference",
- "license": "LICENSE"
- }
- },
- {
- "title": "PHP Workers",
- "links": {
- "php/worker": "Worker",
- "php/environment": "Environment",
- "php/developer": "Developer Mode",
- "php/error-handling": "Error Handling",
- "php/restarting": "Restarting",
- "php/limit": "Process Supervisor",
- "php/rpc": "RPC to App Server",
- "php/caveats": "Caveats",
- "php/debugging": "Debugging"
- }
- },
- {
- "title": "HTTPs and HTTP2",
- "links": {
- "http/https": "HTTPs and HTTP/2",
- "http/static": "Static Content",
- "http/headers": "Headers",
- "http/middleware": "Middleware"
- }
- },
- {
- "title": "App Server",
- "links": {
- "beep-beep/cli": "CLI Commands",
- "beep-beep/logging": "Logging",
- "beep-beep/reload": "Auto-Reloading",
- "beep-beep/production": "Production Usage",
- "beep-beep/systemd": "Writing a RR systemd unit file",
- "beep-beep/metrics": "Prometheus Metrics",
- "beep-beep/health": "Healthcheck",
- "beep-beep/build": "Building a Server",
- "beep-beep/kv": "KeyValue Storage",
- "beep-beep/jobs": "Jobs (Queues)",
- "beep-beep/rpc": "RPC",
- "beep-beep/plugin": "Write a Plugin",
- "beep-beep/service": "Service plugin"
- }
- },
- {
- "title": "Integrations",
- "links": {
- "integration/migration": "Migration from V1 to V2",
- "integration/cake": "CakePHP",
- "integration/laravel": "Laravel",
- "integration/slim": "Slim",
- "integration/spiral": "Spiral Framework",
- "integration/symfony": "Symfony Framework",
- "integration/symlex": "Symlex Framework",
- "integration/ubiquity": "Ubiquity Framework",
- "integration/zend": "Zend Expressive",
- "integration/yii": "Yii2 and Yii3",
- "integration/phalcon": "Phalcon3 and Phalcon4",
- "integration/mezzio": "Mezzio",
- "integration/chubbyphp": "Chubbyphp Framework"
- }
- },
- {
- "title": "Docker",
- "links": {
- "docker/ports": "Ports and Containers",
- "docker/images": "Available Images"
- }
- }
-]
diff --git a/pkg/transport/pipe/pipe_factory_test.go b/pkg/transport/pipe/pipe_factory_test.go
index d243a93f..e396fe57 100755
--- a/pkg/transport/pipe/pipe_factory_test.go
+++ b/pkg/transport/pipe/pipe_factory_test.go
@@ -16,6 +16,7 @@ import (
)
func Test_GetState(t *testing.T) {
+ t.Parallel()
ctx := context.Background()
cmd := exec.Command("php", "../../../tests/client.php", "echo", "pipes")
@@ -36,6 +37,7 @@ func Test_GetState(t *testing.T) {
}
func Test_Kill(t *testing.T) {
+ t.Parallel()
ctx := context.Background()
cmd := exec.Command("php", "../../../tests/client.php", "echo", "pipes")
@@ -60,6 +62,7 @@ func Test_Kill(t *testing.T) {
}
func Test_Pipe_Start(t *testing.T) {
+ t.Parallel()
ctx := context.Background()
cmd := exec.Command("php", "../../../tests/client.php", "echo", "pipes")
@@ -75,6 +78,7 @@ func Test_Pipe_Start(t *testing.T) {
}
func Test_Pipe_StartError(t *testing.T) {
+ t.Parallel()
cmd := exec.Command("php", "../../../tests/client.php", "echo", "pipes")
err := cmd.Start()
if err != nil {
@@ -88,6 +92,7 @@ func Test_Pipe_StartError(t *testing.T) {
}
func Test_Pipe_PipeError(t *testing.T) {
+ t.Parallel()
cmd := exec.Command("php", "../../../tests/client.php", "echo", "pipes")
_, err := cmd.StdinPipe()
if err != nil {
@@ -101,6 +106,7 @@ func Test_Pipe_PipeError(t *testing.T) {
}
func Test_Pipe_PipeError2(t *testing.T) {
+ t.Parallel()
cmd := exec.Command("php", "../../../tests/client.php", "echo", "pipes")
// error cause
_, err := cmd.StdinPipe()
@@ -115,6 +121,7 @@ func Test_Pipe_PipeError2(t *testing.T) {
}
func Test_Pipe_Failboot(t *testing.T) {
+ t.Parallel()
cmd := exec.Command("php", "../../../tests/failboot.php")
ctx := context.Background()
@@ -137,6 +144,7 @@ func Test_Pipe_Failboot(t *testing.T) {
}
func Test_Pipe_Invalid(t *testing.T) {
+ t.Parallel()
cmd := exec.Command("php", "../../../tests/invalid.php")
ctx := context.Background()
w, err := NewPipeFactory().SpawnWorkerWithTimeout(ctx, cmd)
@@ -145,6 +153,7 @@ func Test_Pipe_Invalid(t *testing.T) {
}
func Test_Pipe_Echo(t *testing.T) {
+ t.Parallel()
cmd := exec.Command("php", "../../../tests/client.php", "echo", "pipes")
ctx := context.Background()
w, err := NewPipeFactory().SpawnWorkerWithTimeout(ctx, cmd)
@@ -171,6 +180,7 @@ func Test_Pipe_Echo(t *testing.T) {
}
func Test_Pipe_Broken(t *testing.T) {
+ t.Parallel()
cmd := exec.Command("php", "../../../tests/client.php", "broken", "pipes")
ctx := context.Background()
w, err := NewPipeFactory().SpawnWorkerWithTimeout(ctx, cmd)
@@ -286,6 +296,7 @@ func Benchmark_Pipe_Worker_ExecEchoWithoutContext(b *testing.B) {
}
func Test_Echo(t *testing.T) {
+ t.Parallel()
ctx := context.Background()
cmd := exec.Command("php", "../../../tests/client.php", "echo", "pipes")
@@ -316,6 +327,7 @@ func Test_Echo(t *testing.T) {
}
func Test_BadPayload(t *testing.T) {
+ t.Parallel()
ctx := context.Background()
cmd := exec.Command("php", "../../../tests/client.php", "echo", "pipes")
@@ -342,6 +354,7 @@ func Test_BadPayload(t *testing.T) {
}
func Test_String(t *testing.T) {
+ t.Parallel()
ctx := context.Background()
cmd := exec.Command("php", "../../../tests/client.php", "echo", "pipes")
@@ -362,6 +375,7 @@ func Test_String(t *testing.T) {
}
func Test_Echo_Slow(t *testing.T) {
+ t.Parallel()
ctx := context.Background()
cmd := exec.Command("php", "../../../tests/slow-client.php", "echo", "pipes", "10", "10")
@@ -389,6 +403,7 @@ func Test_Echo_Slow(t *testing.T) {
}
func Test_Broken(t *testing.T) {
+ t.Parallel()
ctx := context.Background()
cmd := exec.Command("php", "../../../tests/client.php", "broken", "pipes")
data := ""
@@ -422,6 +437,7 @@ func Test_Broken(t *testing.T) {
}
func Test_Error(t *testing.T) {
+ t.Parallel()
ctx := context.Background()
cmd := exec.Command("php", "../../../tests/client.php", "error", "pipes")
@@ -450,6 +466,7 @@ func Test_Error(t *testing.T) {
}
func Test_NumExecs(t *testing.T) {
+ t.Parallel()
ctx := context.Background()
cmd := exec.Command("php", "../../../tests/client.php", "echo", "pipes")