mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
Add session id to example tests
This commit is contained in:
parent
1fdf510ae7
commit
1d45095d75
|
@ -8,6 +8,8 @@ if [[ $1 =~ ^[a-z]+$ ]]; then
|
||||||
transport=$1
|
transport=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
SESSION="$(@CMAKE_BINARY_DIR@/fairmq/fairmq-uuid-gen -h)"
|
||||||
|
|
||||||
# setup a trap to kill everything if the test fails/timeouts
|
# 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
|
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+=" --rate 1"
|
||||||
SAMPLER+=" --transport $transport"
|
SAMPLER+=" --transport $transport"
|
||||||
SAMPLER+=" --verbosity veryhigh"
|
SAMPLER+=" --verbosity veryhigh"
|
||||||
|
SAMPLER+=" --session $SESSION"
|
||||||
SAMPLER+=" --control static --color false"
|
SAMPLER+=" --control static --color false"
|
||||||
SAMPLER+=" --max-iterations 1"
|
SAMPLER+=" --max-iterations 1"
|
||||||
SAMPLER+=" --channel-config name=data,type=push,method=bind,address=tcp://*:5555,rateLogging=0"
|
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+=" --id sink1"
|
||||||
SINK+=" --transport $transport"
|
SINK+=" --transport $transport"
|
||||||
SINK+=" --verbosity veryhigh"
|
SINK+=" --verbosity veryhigh"
|
||||||
|
SINK+=" --session $SESSION"
|
||||||
SINK+=" --control static --color false"
|
SINK+=" --control static --color false"
|
||||||
SINK+=" --max-iterations 1"
|
SINK+=" --max-iterations 1"
|
||||||
SINK+=" --channel-config name=data,type=pull,method=connect,address=tcp://localhost:5555,rateLogging=0"
|
SINK+=" --channel-config name=data,type=pull,method=connect,address=tcp://localhost:5555,rateLogging=0"
|
||||||
|
|
|
@ -9,6 +9,7 @@ if [[ $1 =~ ^[a-z]+$ ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ex2config="@CMAKE_CURRENT_BINARY_DIR@/ex-1-n-1.json"
|
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
|
# 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
|
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+=" --id sampler1"
|
||||||
SAMPLER+=" --transport $transport"
|
SAMPLER+=" --transport $transport"
|
||||||
SAMPLER+=" --verbosity veryhigh"
|
SAMPLER+=" --verbosity veryhigh"
|
||||||
|
SAMPLER+=" --session $SESSION"
|
||||||
SAMPLER+=" --control static --color false"
|
SAMPLER+=" --control static --color false"
|
||||||
SAMPLER+=" --max-iterations 2"
|
SAMPLER+=" --max-iterations 2"
|
||||||
SAMPLER+=" --mq-config $ex2config"
|
SAMPLER+=" --mq-config $ex2config"
|
||||||
|
@ -27,6 +29,7 @@ PROCESSOR1="fairmq-ex-1-n-1-processor"
|
||||||
PROCESSOR1+=" --id processor1"
|
PROCESSOR1+=" --id processor1"
|
||||||
PROCESSOR1+=" --transport $transport"
|
PROCESSOR1+=" --transport $transport"
|
||||||
PROCESSOR1+=" --verbosity veryhigh"
|
PROCESSOR1+=" --verbosity veryhigh"
|
||||||
|
PROCESSOR1+=" --session $SESSION"
|
||||||
PROCESSOR1+=" --control static --color false"
|
PROCESSOR1+=" --control static --color false"
|
||||||
PROCESSOR1+=" --mq-config $ex2config"
|
PROCESSOR1+=" --mq-config $ex2config"
|
||||||
PROCESSOR1+=" --config-key processor"
|
PROCESSOR1+=" --config-key processor"
|
||||||
|
@ -37,6 +40,7 @@ PROCESSOR2="fairmq-ex-1-n-1-processor"
|
||||||
PROCESSOR2+=" --id processor2"
|
PROCESSOR2+=" --id processor2"
|
||||||
PROCESSOR2+=" --transport $transport"
|
PROCESSOR2+=" --transport $transport"
|
||||||
PROCESSOR2+=" --verbosity veryhigh"
|
PROCESSOR2+=" --verbosity veryhigh"
|
||||||
|
PROCESSOR2+=" --session $SESSION"
|
||||||
PROCESSOR2+=" --control static --color false"
|
PROCESSOR2+=" --control static --color false"
|
||||||
PROCESSOR2+=" --mq-config $ex2config"
|
PROCESSOR2+=" --mq-config $ex2config"
|
||||||
PROCESSOR2+=" --config-key processor"
|
PROCESSOR2+=" --config-key processor"
|
||||||
|
@ -47,6 +51,7 @@ SINK="fairmq-ex-1-n-1-sink"
|
||||||
SINK+=" --id sink1"
|
SINK+=" --id sink1"
|
||||||
SINK+=" --transport $transport"
|
SINK+=" --transport $transport"
|
||||||
SINK+=" --verbosity veryhigh"
|
SINK+=" --verbosity veryhigh"
|
||||||
|
SINK+=" --session $SESSION"
|
||||||
SINK+=" --control static --color false"
|
SINK+=" --control static --color false"
|
||||||
SINK+=" --max-iterations 2"
|
SINK+=" --max-iterations 2"
|
||||||
SINK+=" --mq-config $ex2config"
|
SINK+=" --mq-config $ex2config"
|
||||||
|
|
|
@ -8,6 +8,8 @@ if [[ $1 =~ ^[a-z]+$ ]]; then
|
||||||
transport=$1
|
transport=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
SESSION="$(@CMAKE_BINARY_DIR@/fairmq/fairmq-uuid-gen -h)"
|
||||||
|
|
||||||
# setup a trap to kill everything if the test fails/timeouts
|
# 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
|
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+=" --id sampler1"
|
||||||
SAMPLER+=" --transport $transport"
|
SAMPLER+=" --transport $transport"
|
||||||
SAMPLER+=" --verbosity veryhigh"
|
SAMPLER+=" --verbosity veryhigh"
|
||||||
|
SAMPLER+=" --session $SESSION"
|
||||||
SAMPLER+=" --control static --color false"
|
SAMPLER+=" --control static --color false"
|
||||||
SAMPLER+=" --max-iterations 1"
|
SAMPLER+=" --max-iterations 1"
|
||||||
SAMPLER+=" --channel-config name=data,type=push,method=bind,rateLogging=0,address=tcp://*:5555,address=tcp://*:5556"
|
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+=" --id sink1"
|
||||||
SINK1+=" --transport $transport"
|
SINK1+=" --transport $transport"
|
||||||
SINK1+=" --verbosity veryhigh"
|
SINK1+=" --verbosity veryhigh"
|
||||||
|
SINK1+=" --session $SESSION"
|
||||||
SINK1+=" --control static --color false"
|
SINK1+=" --control static --color false"
|
||||||
SINK1+=" --max-iterations 1"
|
SINK1+=" --max-iterations 1"
|
||||||
SINK1+=" --channel-config name=data,type=pull,method=connect,rateLogging=0,address=tcp://localhost:5555"
|
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+=" --id sink2"
|
||||||
SINK2+=" --transport $transport"
|
SINK2+=" --transport $transport"
|
||||||
SINK2+=" --verbosity veryhigh"
|
SINK2+=" --verbosity veryhigh"
|
||||||
|
SINK2+=" --session $SESSION"
|
||||||
SINK2+=" --control static --color false"
|
SINK2+=" --control static --color false"
|
||||||
SINK2+=" --max-iterations 1"
|
SINK2+=" --max-iterations 1"
|
||||||
SINK2+=" --channel-config name=data,type=pull,method=connect,rateLogging=0,address=tcp://localhost:5556"
|
SINK2+=" --channel-config name=data,type=pull,method=connect,rateLogging=0,address=tcp://localhost:5556"
|
||||||
|
|
|
@ -8,6 +8,8 @@ if [[ $1 =~ ^[a-z]+$ ]]; then
|
||||||
transport=$1
|
transport=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
SESSION="$(@CMAKE_BINARY_DIR@/fairmq/fairmq-uuid-gen -h)"
|
||||||
|
|
||||||
# setup a trap to kill everything if the test fails/timeouts
|
# 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
|
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+=" --id sampler1"
|
||||||
SAMPLER+=" --transport $transport"
|
SAMPLER+=" --transport $transport"
|
||||||
SAMPLER+=" --verbosity veryhigh"
|
SAMPLER+=" --verbosity veryhigh"
|
||||||
|
SAMPLER+=" --session $SESSION"
|
||||||
SAMPLER+=" --max-iterations 1"
|
SAMPLER+=" --max-iterations 1"
|
||||||
SAMPLER+=" --control static --color false"
|
SAMPLER+=" --control static --color false"
|
||||||
SAMPLER+=" --channel-config name=data,type=push,method=connect,rateLogging=0,address=tcp://127.0.0.1:5555"
|
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+=" --id sink1"
|
||||||
SINK+=" --transport $transport"
|
SINK+=" --transport $transport"
|
||||||
SINK+=" --verbosity veryhigh"
|
SINK+=" --verbosity veryhigh"
|
||||||
|
SINK+=" --session $SESSION"
|
||||||
SINK+=" --control static --color false"
|
SINK+=" --control static --color false"
|
||||||
SINK+=" --channel-config name=data,type=pull,method=bind,rateLogging=0,address=tcp://127.0.0.1:5555"
|
SINK+=" --channel-config name=data,type=pull,method=bind,rateLogging=0,address=tcp://127.0.0.1:5555"
|
||||||
@CMAKE_CURRENT_BINARY_DIR@/$SINK &
|
@CMAKE_CURRENT_BINARY_DIR@/$SINK &
|
||||||
|
|
|
@ -8,6 +8,8 @@ if [[ $1 =~ ^[a-z]+$ ]]; then
|
||||||
transport=$1
|
transport=$1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
SESSION="$(@CMAKE_BINARY_DIR@/fairmq/fairmq-uuid-gen -h)"
|
||||||
|
|
||||||
# setup a trap to kill everything if the test fails/timeouts
|
# 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
|
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+=" --id client"
|
||||||
CLIENT+=" --transport $transport"
|
CLIENT+=" --transport $transport"
|
||||||
CLIENT+=" --verbosity veryhigh"
|
CLIENT+=" --verbosity veryhigh"
|
||||||
|
CLIENT+=" --session $SESSION"
|
||||||
CLIENT+=" --control static --color false"
|
CLIENT+=" --control static --color false"
|
||||||
CLIENT+=" --max-iterations 1"
|
CLIENT+=" --max-iterations 1"
|
||||||
CLIENT+=" --channel-config name=data,type=req,method=connect,rateLogging=0,address=tcp://127.0.0.1:5005"
|
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+=" --id server"
|
||||||
SERVER+=" --transport $transport"
|
SERVER+=" --transport $transport"
|
||||||
SERVER+=" --verbosity veryhigh"
|
SERVER+=" --verbosity veryhigh"
|
||||||
|
SERVER+=" --session $SESSION"
|
||||||
SERVER+=" --control static --color false"
|
SERVER+=" --control static --color false"
|
||||||
SERVER+=" --max-iterations 1"
|
SERVER+=" --max-iterations 1"
|
||||||
SERVER+=" --channel-config name=data,type=rep,method=bind,rateLogging=0,address=tcp://127.0.0.1:5005"
|
SERVER+=" --channel-config name=data,type=rep,method=bind,rateLogging=0,address=tcp://127.0.0.1:5005"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user