From 9ebf133981c6ad9a6b294801f557fc6fb7838c41 Mon Sep 17 00:00:00 2001 From: Mahad Zaryab Date: Sat, 5 Oct 2024 23:02:05 -0400 Subject: [PATCH] Fix Linting Signed-off-by: Mahad Zaryab --- scripts/adaptive-sampling-integration-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/adaptive-sampling-integration-test.sh b/scripts/adaptive-sampling-integration-test.sh index bb246405d43..9da126b67c0 100755 --- a/scripts/adaptive-sampling-integration-test.sh +++ b/scripts/adaptive-sampling-integration-test.sh @@ -63,12 +63,12 @@ check_tracegen_probability() { local url="http://localhost:5778/api/sampling?service=tracegen" response=$(curl -s "$url") probability=$(echo "$response" | jq .operationSampling | jq -r '.perOperationStrategies[] | select(.operation=="lets-go")' | jq .probabilisticSampling.samplingRate) - if [ ! -z "$probability" ]; then + if [ -n "$probability" ]; then if (( $(echo "$probability < $threshold" |bc -l) )); then return 0 fi fi - return -1 + return 1 } check_adaptive_sampling() { @@ -81,7 +81,7 @@ check_adaptive_sampling() { sleep $wait_seconds done if [[ "$success" == "false" ]]; then - echo "❌ ERROR: Adaptive sampling probability did not drop below "$threshold"." + echo "❌ ERROR: Adaptive sampling probability did not drop below $threshold." exit 1 else echo "✅ Adaptive sampling probability integration test passed"