Skip to content

Commit

Permalink
Move to L0_request_cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayv25 committed Sep 12, 2023
1 parent a10c3dd commit 3fbbe52
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 103 deletions.
103 changes: 0 additions & 103 deletions qa/L0_client_cancellation/test.sh

This file was deleted.

52 changes: 52 additions & 0 deletions qa/L0_request_cancellation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,23 @@ DATADIR=${DATADIR:="/data/inferenceserver/${REPO_VERSION}"}
RET=0

mkdir -p models/model/1
mkdir -p $DATADIR/custom_identity_int32/1

export CUDA_VISIBLE_DEVICES=0

RET=0

CLIENT_CANCELLATION_TEST=client_cancellation_test.py
TEST_RESULT_FILE='test_results.txt'

rm -f *.log
rm -f *.log.*

CLIENT_LOG=`pwd`/client.log
DATADIR=`pwd`/models
SERVER=/opt/tritonserver/bin/tritonserver
SERVER_ARGS="--model-repository=$DATADIR --log-verbose=1"
source ../common/util.sh

SERVER_LOG=server.log
LD_LIBRARY_PATH=/opt/tritonserver/lib:$LD_LIBRARY_PATH ./request_cancellation_test > $SERVER_LOG
Expand All @@ -50,6 +67,41 @@ if [ $? -ne 0 ]; then
RET=1
fi

# gRPC client-side cancellation tests...
for i in test_grpc_async_infer \
test_grpc_stream_infer \
test_aio_grpc_async_infer \
test_aio_grpc_stream_infer \
; do

SERVER_LOG=${i}.server.log
run_server
if [ "$SERVER_PID" == "0" ]; then
echo -e "\n***\n*** Failed to start $SERVER\n***"
cat $SERVER_LOG
exit 1
fi

set +e
python $CLIENT_CANCELLATION_TEST ClientCancellationTest.$i >>$CLIENT_LOG 2>&1
if [ $? -ne 0 ]; then
echo -e "\n***\n*** Test $i Failed\n***" >>$CLIENT_LOG
echo -e "\n***\n*** Test $i Failed\n***"
RET=1
else
check_test_results $TEST_RESULT_FILE 1
if [ $? -ne 0 ]; then
cat $CLIENT_LOG
echo -e "\n***\n*** Test Result Verification Failed\n***"
RET=1
fi
fi

set -e
kill $SERVER_PID
wait $SERVER_PID
done

if [ $RET -eq 0 ]; then
echo -e "\n***\n*** Test Passed\n***"
else
Expand Down

0 comments on commit 3fbbe52

Please sign in to comment.