diff options
Diffstat (limited to 'service/test/reactor')
-rwxr-xr-x | service/test/reactor/concurrent_logins.sh | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/service/test/reactor/concurrent_logins.sh b/service/test/reactor/concurrent_logins.sh index 40e37d6a..f1e0b654 100755 --- a/service/test/reactor/concurrent_logins.sh +++ b/service/test/reactor/concurrent_logins.sh @@ -6,20 +6,22 @@ COUNT=$1 function curl_command { index=$1 - username=$USER_PATTERN$index - password=$PASSWORD_PATTERN$index - curl -sIL -X POST \ - --data "username=$username&password=$password" \ + username=${USER_PATTERN}${index} + password=${PASSWORD_PATTERN}${index} + + curl -siL -X POST \ + --data "username=${username}&password=${password}" \ --cookie 'XSRF-TOKEN: blablabla' \ --header 'X-Requested-With: XMLHttpRequest' \ --header 'X-XSRF-TOKEN: blablabla' \ http://localhost:3333/login |\ - grep 'HTTP' |\ - tail -1 + grep '^HTTP' } for index in $(seq $COUNT); do curl_command $index & + PIDS="$PIDS $!" sleep 1 done -wait + +wait $PIDS |