-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CP-47033: Add test for concurrent message switch server
Signed-off-by: Vincent Liu <[email protected]>
- Loading branch information
1 parent
8b81958
commit 966b636
Showing
5 changed files
with
91 additions
and
5 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
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
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,45 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
SPATH="${TMPDIR:-/tmp}/sock_p-$$" | ||
SWITCHPATH="${TMPDIR:-/tmp}/switch_p-$$" | ||
|
||
trap "cleanup" TERM INT | ||
|
||
function cleanup { | ||
rm -rf "${SWITCHPATH}" | ||
} | ||
|
||
rm -rf "${SWITCHPATH}" && mkdir -p "${SWITCHPATH}" | ||
|
||
echo Test message switch concurrent processing | ||
|
||
echo Checking the switch can start late | ||
test -x ./server_unix_main.exe || exit 1 | ||
./server_unix_main.exe -path "$SPATH" & | ||
sleep 1 | ||
test -x ../switch/switch_main.exe && test -x ./client_unix_main.exe || exit 1 | ||
../switch/switch_main.exe --path "$SPATH" --statedir "${SWITCHPATH}" & | ||
./client_unix_main.exe -path "$SPATH" -secs 5 | ||
sleep 2 | ||
|
||
echo Performance test of Lwt to Lwt | ||
test -x lwt/server_main.exe && test -x lwt/client_main.exe || exit 1 | ||
lwt/server_main.exe -path "$SPATH" -concurrent & | ||
lwt/client_main.exe -path "$SPATH" -secs 5 | ||
sleep 2 | ||
|
||
echo Performance test of Async to Lwt | ||
test -x lwt/server_main.exe && test -x async/client_async_main.exe || exit 1 | ||
lwt/server_main.exe -path "$SPATH" -concurrent & | ||
async/client_async_main.exe -path "$SPATH" -secs 5 | ||
sleep 2 | ||
|
||
echo Performance test of Async to Async | ||
test -x async/server_async_main.exe && test -x async/client_async_main.exe || exit 1 | ||
async/server_async_main.exe -path "$SPATH" -concurrent & | ||
async/client_async_main.exe -path "$SPATH" -secs 5 | ||
sleep 2 | ||
|
||
../cli/main.exe shutdown --path "$SPATH" | ||
sleep 2 |
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
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