From 118614d56b6bb1413d9cdf6b463d28da8ad20c84 Mon Sep 17 00:00:00 2001 From: karnem <mikhail.karnevskiy@desy.de> Date: Fri, 4 Aug 2023 19:32:01 +0200 Subject: [PATCH] modify kafka test to be compatible with build env --- .../check_linux.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/automatic/producer_receiver/transfer_single_file_with_kafka/check_linux.sh b/tests/automatic/producer_receiver/transfer_single_file_with_kafka/check_linux.sh index 119354a5d..4898118dc 100644 --- a/tests/automatic/producer_receiver/transfer_single_file_with_kafka/check_linux.sh +++ b/tests/automatic/producer_receiver/transfer_single_file_with_kafka/check_linux.sh @@ -16,13 +16,13 @@ receiver_folder_online=${receiver_root_folder}/beamline/${beamline}/current Cleanup() { echo cleanup set +e - nomad stop receiver - nomad run receiver_tcp.nmd + cp /receiver_tcp.json /receiver.json + supervisorctl restart receiver while true do sleep 1 - curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-receiver?protocol=v0.6 --stderr - | grep 127.0.0.1 || continue - echo recevier started + curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-receiver?protocol=v0.6 --stderr - | grep localhost || continue + echo recevier tcp started break done rm -rf ${receiver_root_folder} @@ -47,14 +47,14 @@ done BOOTSTRAP=$(cat bootstrap) echo "Read kafka bootstrap: ${BOOTSTRAP}" - -nomad stop receiver -nomad run -var receiver_kafka_metadata_broker_list="${BOOTSTRAP}" receiver_kafka.nmd +sed "s/BROKER_LIST/${BOOTSTRAP}/g" /receiver_kafka.json > /receiver.json +cat /receiver.json +supervisorctl restart receiver while true do sleep 1 - curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-receiver?protocol=v0.6 --stderr - | grep 127.0.0.1 || continue - echo recevier started + curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-receiver?protocol=v0.6 --stderr - | grep localhost || continue + echo recevier kafka started break done @@ -63,6 +63,7 @@ mkdir -p ${receiver_folder_online} $1 localhost:8400 ${beamtime_id} 100 1 1 100 30 +ls -ln ${receiver_folder_online}/raw/1 ls -ln ${receiver_folder_online}/raw/1 | awk '{ print $5 }'| grep 100000 wait $KAFKA_PID -- GitLab