Handle SIGTERM signal in mqtrigger subscriber (#2029)
In test_mqtrigger.sh and test_mqtrigger_error.sh tests, we timeout program if not received right output. Ensuring we capture timeout signal and do program cleanup accordingly. Also printing due to which signal program failed. Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -59,7 +59,7 @@ go run $DIR/stan-pub/main.go -s $FISSION_NATS_STREAMING_URL -c $clusterID -id $p
|
||||
# Wait for message on response topic
|
||||
#
|
||||
log "Waiting for response"
|
||||
response=$(timeout 5s go run $DIR/stan-sub/main.go --last -s $FISSION_NATS_STREAMING_URL -c $clusterID -id $subClientID $resptopic 2>&1 || true)
|
||||
response=$(timeout 10s go run $DIR/stan-sub/main.go --last -s $FISSION_NATS_STREAMING_URL -c $clusterID -id $subClientID $resptopic 2>&1 || true)
|
||||
log "Output from subscriber"
|
||||
echo "$response"
|
||||
echo "$response" | grep "$expectedRespOutput"
|
||||
|
||||
Reference in New Issue
Block a user