Skip to content

Commit 02da628

Browse files
committed
Rebase on main. Changes on test to avoid early exit
1 parent 8342be2 commit 02da628

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

qa/L0_trace/test.sh

+11-2
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,8 @@ set -e
658658
kill $SERVER_PID
659659
wait $SERVER_PID
660660

661+
set +e
662+
661663
# Check opentelemetry trace exporter sends proper info.
662664
# A helper python script starts listenning on $OTLP_PORT, where
663665
# OTLP exporter sends traces.
@@ -673,6 +675,12 @@ SERVER_ARGS="--trace-config=level=TIMESTAMPS --trace-config=rate=1 \
673675
--trace-config=opentelemetry,url=localhost:$OTLP_PORT \
674676
--model-repository=$MODELSDIR"
675677
SERVER_LOG="./inference_server_trace_config.log"
678+
679+
# Increasing OTLP timeout, since we don't use a valid OTLP collector
680+
# and don't send a proper signal back.
681+
export OTEL_EXPORTER_OTLP_TIMEOUT=50000
682+
export OTEL_EXPORTER_OTLP_TRACES_TIMEOUT=50000
683+
676684
run_server
677685
if [ "$SERVER_PID" == "0" ]; then
678686
echo -e "\n***\n*** Failed to start $SERVER\n***"
@@ -684,13 +692,14 @@ fi
684692
apt-get update && apt-get install -y netcat
685693
nc -l -k 127.0.0.1 $OTLP_PORT >> $TRACE_COLLECTOR_LOG 2>&1 & COLLECTOR_PID=$!
686694

695+
set +e
687696
# Preparing traces for unittest.
688697
# Note: need to run this separately, to speed up trace collection.
689698
# Otherwise internal (opentelemetry_unittest.OpenTelemetryTest.setUp) check
690699
# will slow down collection.
691-
python -c 'import opentelemetry_unittest; opentelemetry_unittest.prepare_traces()' >>$CLIENT_LOG 2>&1
700+
python -c 'import opentelemetry_unittest; \
701+
opentelemetry_unittest.prepare_traces()' >>$CLIENT_LOG 2>&1
692702

693-
set +e
694703
# Unittest will not start untill expected number of spans is collected.
695704
python $OPENTELEMETRY_TEST >>$OPENTELEMETRY_LOG 2>&1
696705
if [ $? -ne 0 ]; then

0 commit comments

Comments
 (0)