Skip to content

Commit 3fbbe52

Browse files
committed
Move to L0_request_cancellation
1 parent a10c3dd commit 3fbbe52

File tree

4 files changed

+52
-103
lines changed

4 files changed

+52
-103
lines changed

qa/L0_client_cancellation/test.sh

-103
This file was deleted.

qa/L0_request_cancellation/test.sh

+52
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,23 @@ DATADIR=${DATADIR:="/data/inferenceserver/${REPO_VERSION}"}
4242
RET=0
4343

4444
mkdir -p models/model/1
45+
mkdir -p $DATADIR/custom_identity_int32/1
46+
47+
export CUDA_VISIBLE_DEVICES=0
48+
49+
RET=0
50+
51+
CLIENT_CANCELLATION_TEST=client_cancellation_test.py
52+
TEST_RESULT_FILE='test_results.txt'
53+
54+
rm -f *.log
55+
rm -f *.log.*
56+
57+
CLIENT_LOG=`pwd`/client.log
58+
DATADIR=`pwd`/models
59+
SERVER=/opt/tritonserver/bin/tritonserver
60+
SERVER_ARGS="--model-repository=$DATADIR --log-verbose=1"
61+
source ../common/util.sh
4562

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

70+
# gRPC client-side cancellation tests...
71+
for i in test_grpc_async_infer \
72+
test_grpc_stream_infer \
73+
test_aio_grpc_async_infer \
74+
test_aio_grpc_stream_infer \
75+
; do
76+
77+
SERVER_LOG=${i}.server.log
78+
run_server
79+
if [ "$SERVER_PID" == "0" ]; then
80+
echo -e "\n***\n*** Failed to start $SERVER\n***"
81+
cat $SERVER_LOG
82+
exit 1
83+
fi
84+
85+
set +e
86+
python $CLIENT_CANCELLATION_TEST ClientCancellationTest.$i >>$CLIENT_LOG 2>&1
87+
if [ $? -ne 0 ]; then
88+
echo -e "\n***\n*** Test $i Failed\n***" >>$CLIENT_LOG
89+
echo -e "\n***\n*** Test $i Failed\n***"
90+
RET=1
91+
else
92+
check_test_results $TEST_RESULT_FILE 1
93+
if [ $? -ne 0 ]; then
94+
cat $CLIENT_LOG
95+
echo -e "\n***\n*** Test Result Verification Failed\n***"
96+
RET=1
97+
fi
98+
fi
99+
100+
set -e
101+
kill $SERVER_PID
102+
wait $SERVER_PID
103+
done
104+
53105
if [ $RET -eq 0 ]; then
54106
echo -e "\n***\n*** Test Passed\n***"
55107
else

0 commit comments

Comments
 (0)