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:
@@ -63,7 +63,7 @@ go run $DIR/stan-pub/main.go -s $FISSION_NATS_STREAMING_URL -c $clusterID -id $p
|
||||
# Wait for message on error 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 $errortopic 2>&1 || true)
|
||||
response=$(timeout 10s go run $DIR/stan-sub/main.go --last -s $FISSION_NATS_STREAMING_URL -c $clusterID -id $subClientID $errortopic 2>&1 || true)
|
||||
log "Output from subscriber"
|
||||
echo "$response"
|
||||
echo "$response" | grep "$expectedRespOutput"
|
||||
|
||||
Reference in New Issue
Block a user