From 1d45095d7527c51ab3c88f18ffa255aea6222e14 Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Thu, 11 Oct 2018 11:13:42 +0200 Subject: [PATCH] Add session id to example tests --- examples/1-1/test-ex-1-1.sh.in | 4 ++++ examples/1-n-1/test-ex-1-n-1.sh.in | 5 +++++ examples/copypush/test-ex-copypush.sh.in | 5 +++++ examples/multipart/test-ex-multipart.sh.in | 4 ++++ examples/req-rep/test-ex-req-rep.sh.in | 4 ++++ 5 files changed, 22 insertions(+) diff --git a/examples/1-1/test-ex-1-1.sh.in b/examples/1-1/test-ex-1-1.sh.in index f398c659..84b09565 100755 --- a/examples/1-1/test-ex-1-1.sh.in +++ b/examples/1-1/test-ex-1-1.sh.in @@ -8,6 +8,8 @@ if [[ $1 =~ ^[a-z]+$ ]]; then transport=$1 fi +SESSION="$(@CMAKE_BINARY_DIR@/fairmq/fairmq-uuid-gen -h)" + # setup a trap to kill everything if the test fails/timeouts trap 'kill -TERM $SAMPLER_PID; kill -TERM $SINK_PID; wait $SAMPLER_PID; wait $SINK_PID;' TERM @@ -16,6 +18,7 @@ SAMPLER+=" --id sampler1" SAMPLER+=" --rate 1" SAMPLER+=" --transport $transport" SAMPLER+=" --verbosity veryhigh" +SAMPLER+=" --session $SESSION" SAMPLER+=" --control static --color false" SAMPLER+=" --max-iterations 1" SAMPLER+=" --channel-config name=data,type=push,method=bind,address=tcp://*:5555,rateLogging=0" @@ -26,6 +29,7 @@ SINK="fairmq-ex-1-1-sink" SINK+=" --id sink1" SINK+=" --transport $transport" SINK+=" --verbosity veryhigh" +SINK+=" --session $SESSION" SINK+=" --control static --color false" SINK+=" --max-iterations 1" SINK+=" --channel-config name=data,type=pull,method=connect,address=tcp://localhost:5555,rateLogging=0" diff --git a/examples/1-n-1/test-ex-1-n-1.sh.in b/examples/1-n-1/test-ex-1-n-1.sh.in index bce62771..898c78dc 100755 --- a/examples/1-n-1/test-ex-1-n-1.sh.in +++ b/examples/1-n-1/test-ex-1-n-1.sh.in @@ -9,6 +9,7 @@ if [[ $1 =~ ^[a-z]+$ ]]; then fi ex2config="@CMAKE_CURRENT_BINARY_DIR@/ex-1-n-1.json" +SESSION="$(@CMAKE_BINARY_DIR@/fairmq/fairmq-uuid-gen -h)" # setup a trap to kill everything if the test fails/timeouts trap 'kill -TERM $SAMPLER_PID; kill -TERM $SINK_PID; kill -TERM $PROCESSOR1_PID; kill -TERM $PROCESSOR2_PID; wait $SAMPLER_PID; wait $SINK_PID; wait $PROCESSOR1_PID; wait $PROCESSOR2_PID;' TERM @@ -17,6 +18,7 @@ SAMPLER="fairmq-ex-1-n-1-sampler" SAMPLER+=" --id sampler1" SAMPLER+=" --transport $transport" SAMPLER+=" --verbosity veryhigh" +SAMPLER+=" --session $SESSION" SAMPLER+=" --control static --color false" SAMPLER+=" --max-iterations 2" SAMPLER+=" --mq-config $ex2config" @@ -27,6 +29,7 @@ PROCESSOR1="fairmq-ex-1-n-1-processor" PROCESSOR1+=" --id processor1" PROCESSOR1+=" --transport $transport" PROCESSOR1+=" --verbosity veryhigh" +PROCESSOR1+=" --session $SESSION" PROCESSOR1+=" --control static --color false" PROCESSOR1+=" --mq-config $ex2config" PROCESSOR1+=" --config-key processor" @@ -37,6 +40,7 @@ PROCESSOR2="fairmq-ex-1-n-1-processor" PROCESSOR2+=" --id processor2" PROCESSOR2+=" --transport $transport" PROCESSOR2+=" --verbosity veryhigh" +PROCESSOR2+=" --session $SESSION" PROCESSOR2+=" --control static --color false" PROCESSOR2+=" --mq-config $ex2config" PROCESSOR2+=" --config-key processor" @@ -47,6 +51,7 @@ SINK="fairmq-ex-1-n-1-sink" SINK+=" --id sink1" SINK+=" --transport $transport" SINK+=" --verbosity veryhigh" +SINK+=" --session $SESSION" SINK+=" --control static --color false" SINK+=" --max-iterations 2" SINK+=" --mq-config $ex2config" diff --git a/examples/copypush/test-ex-copypush.sh.in b/examples/copypush/test-ex-copypush.sh.in index cc0d88e7..3fba7205 100755 --- a/examples/copypush/test-ex-copypush.sh.in +++ b/examples/copypush/test-ex-copypush.sh.in @@ -8,6 +8,8 @@ if [[ $1 =~ ^[a-z]+$ ]]; then transport=$1 fi +SESSION="$(@CMAKE_BINARY_DIR@/fairmq/fairmq-uuid-gen -h)" + # setup a trap to kill everything if the test fails/timeouts trap 'kill -TERM $SAMPLER_PID; kill -TERM $SINK1_PID; kill -TERM $SINK2_PID; wait $SAMPLER_PID; wait $SINK1_PID; wait $SINK2_PID;' TERM @@ -15,6 +17,7 @@ SAMPLER="fairmq-ex-copypush-sampler" SAMPLER+=" --id sampler1" SAMPLER+=" --transport $transport" SAMPLER+=" --verbosity veryhigh" +SAMPLER+=" --session $SESSION" SAMPLER+=" --control static --color false" SAMPLER+=" --max-iterations 1" SAMPLER+=" --channel-config name=data,type=push,method=bind,rateLogging=0,address=tcp://*:5555,address=tcp://*:5556" @@ -25,6 +28,7 @@ SINK1="fairmq-ex-copypush-sink" SINK1+=" --id sink1" SINK1+=" --transport $transport" SINK1+=" --verbosity veryhigh" +SINK1+=" --session $SESSION" SINK1+=" --control static --color false" SINK1+=" --max-iterations 1" SINK1+=" --channel-config name=data,type=pull,method=connect,rateLogging=0,address=tcp://localhost:5555" @@ -35,6 +39,7 @@ SINK2="fairmq-ex-copypush-sink" SINK2+=" --id sink2" SINK2+=" --transport $transport" SINK2+=" --verbosity veryhigh" +SINK2+=" --session $SESSION" SINK2+=" --control static --color false" SINK2+=" --max-iterations 1" SINK2+=" --channel-config name=data,type=pull,method=connect,rateLogging=0,address=tcp://localhost:5556" diff --git a/examples/multipart/test-ex-multipart.sh.in b/examples/multipart/test-ex-multipart.sh.in index 08c104ff..ee7a39c4 100755 --- a/examples/multipart/test-ex-multipart.sh.in +++ b/examples/multipart/test-ex-multipart.sh.in @@ -8,6 +8,8 @@ if [[ $1 =~ ^[a-z]+$ ]]; then transport=$1 fi +SESSION="$(@CMAKE_BINARY_DIR@/fairmq/fairmq-uuid-gen -h)" + # setup a trap to kill everything if the test fails/timeouts trap 'kill -TERM $SAMPLER_PID; kill -TERM $SINK_PID; wait $SAMPLER_PID; wait $SINK_PID;' TERM @@ -15,6 +17,7 @@ SAMPLER="fairmq-ex-multipart-sampler" SAMPLER+=" --id sampler1" SAMPLER+=" --transport $transport" SAMPLER+=" --verbosity veryhigh" +SAMPLER+=" --session $SESSION" SAMPLER+=" --max-iterations 1" SAMPLER+=" --control static --color false" SAMPLER+=" --channel-config name=data,type=push,method=connect,rateLogging=0,address=tcp://127.0.0.1:5555" @@ -25,6 +28,7 @@ SINK="fairmq-ex-multipart-sink" SINK+=" --id sink1" SINK+=" --transport $transport" SINK+=" --verbosity veryhigh" +SINK+=" --session $SESSION" SINK+=" --control static --color false" SINK+=" --channel-config name=data,type=pull,method=bind,rateLogging=0,address=tcp://127.0.0.1:5555" @CMAKE_CURRENT_BINARY_DIR@/$SINK & diff --git a/examples/req-rep/test-ex-req-rep.sh.in b/examples/req-rep/test-ex-req-rep.sh.in index c4f75932..6c13de45 100755 --- a/examples/req-rep/test-ex-req-rep.sh.in +++ b/examples/req-rep/test-ex-req-rep.sh.in @@ -8,6 +8,8 @@ if [[ $1 =~ ^[a-z]+$ ]]; then transport=$1 fi +SESSION="$(@CMAKE_BINARY_DIR@/fairmq/fairmq-uuid-gen -h)" + # setup a trap to kill everything if the test fails/timeouts trap 'kill -TERM $CLIENT_PID; kill -TERM $SERVER_PID; wait $CLIENT_PID; wait $SERVER_PID;' TERM @@ -15,6 +17,7 @@ CLIENT="fairmq-ex-req-rep-client" CLIENT+=" --id client" CLIENT+=" --transport $transport" CLIENT+=" --verbosity veryhigh" +CLIENT+=" --session $SESSION" CLIENT+=" --control static --color false" CLIENT+=" --max-iterations 1" CLIENT+=" --channel-config name=data,type=req,method=connect,rateLogging=0,address=tcp://127.0.0.1:5005" @@ -25,6 +28,7 @@ SERVER="fairmq-ex-req-rep-server" SERVER+=" --id server" SERVER+=" --transport $transport" SERVER+=" --verbosity veryhigh" +SERVER+=" --session $SESSION" SERVER+=" --control static --color false" SERVER+=" --max-iterations 1" SERVER+=" --channel-config name=data,type=rep,method=bind,rateLogging=0,address=tcp://127.0.0.1:5005"