-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-introducing tests for Parallel Execution
This partially reverts commit 0a7debf.
- Loading branch information
Lucas Hinderberger
committed
Jun 6, 2024
1 parent
97ab9b6
commit 6e6f8ff
Showing
6 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[ | ||
{ | ||
"name": "bounce-json: bounce collected responses from parallel runs: {{ datastore "responses" }}", | ||
"request": { | ||
"server_url": "http://localhost{{ datastore "local_port" }}", | ||
"endpoint": "bounce-json", | ||
"method": "POST", | ||
"body": { | ||
"responses": {{ datastore "responses" | marshal }} | ||
} | ||
}, | ||
"response": { | ||
"statuscode": 200, | ||
"body": { | ||
"body": { | ||
"responses": [ | ||
{{ range $idx, $n := N (datastore "n_parallel") }} | ||
{{ if gt $idx 0 }}, {{ end }} | ||
{{ $idx }} | ||
{{ end }} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{ $local_port := ":9999" }} | ||
{{ $n_parallel := 5 }} | ||
{ | ||
"http_server": { | ||
"addr": "{{ $local_port }}", | ||
"dir": "../_res", | ||
"testmode": false | ||
}, | ||
"name": "parallel run of files", | ||
"tests": [ | ||
{ | ||
"name": "port {{ $local_port }}", | ||
"store": { | ||
"n_parallel": {{ $n_parallel }}, | ||
"local_port": {{ $local_port | marshal }} | ||
} | ||
}, | ||
"p@parallel.json", | ||
"@check_collected_responses.json" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[ | ||
{{ range $idx, $n := N (datastore "n_parallel") }} | ||
{{ if gt $idx 0 }}, {{ end }} | ||
{ | ||
"name": "bounce-json: bounce n={{ $idx }}", | ||
"request": { | ||
"server_url": "http://localhost{{ datastore "local_port" }}", | ||
"endpoint": "bounce-json", | ||
"method": "POST", | ||
"body": { | ||
"n": {{ $idx }} | ||
} | ||
}, | ||
"response": { | ||
"statuscode": 200, | ||
"body": { | ||
"body": { | ||
"n": {{ $idx }} | ||
} | ||
} | ||
}, | ||
"store_response_qjson": { | ||
"responses[]": "body.body.n" | ||
} | ||
} | ||
{{ end }} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[ | ||
{ | ||
"name": "bounce-json: bounce collected responses from N={{datastore "n_parallel"}} parallel runs: {{ datastore "responses" }}", | ||
"request": { | ||
"server_url": "http://localhost{{ datastore "local_port" }}", | ||
"endpoint": "bounce-json", | ||
"method": "POST", | ||
"body": { | ||
"responses": {{ datastore "responses" | marshal }} | ||
} | ||
}, | ||
"response": { | ||
"statuscode": 200, | ||
"body": { | ||
"body": { | ||
"responses": [ | ||
{{ range $idx, $n := N (datastore "n_parallel") }} | ||
{{ if gt $idx 0 }}, {{ end }} | ||
1 | ||
{{ end }} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{ $local_port := ":9999" }} | ||
{{ $n_parallel := 5 }} | ||
{ | ||
"http_server": { | ||
"addr": "{{ $local_port }}", | ||
"dir": "../_res", | ||
"testmode": false | ||
}, | ||
"name": "parallel run of N={{ $n_parallel }} repetitions", | ||
"tests": [ | ||
{ | ||
"name": "port {{ $local_port }}", | ||
"store": { | ||
"n_parallel": {{ $n_parallel }}, | ||
"local_port": {{ $local_port | marshal }} | ||
} | ||
} | ||
, "p{{ $n_parallel }}@parallel.json" | ||
, "@check_collected_responses.json" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[ | ||
{ | ||
"name": "bounce-json: bounce n=1", | ||
"request": { | ||
"server_url": "http://localhost{{ datastore "local_port" }}", | ||
"endpoint": "bounce-json", | ||
"method": "POST", | ||
"body": { | ||
"n": 1 | ||
} | ||
}, | ||
"response": { | ||
"statuscode": 200, | ||
"body": { | ||
"body": { | ||
"n": 1 | ||
} | ||
} | ||
}, | ||
"store_response_qjson": { | ||
"responses[]": "body.body.n" | ||
} | ||
} | ||
] |