Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI tests for java client #3323

Merged
merged 1 commit into from
Sep 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile.QA
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ RUN mkdir -p qa/clients && mkdir -p qa/pkgs && \
cp install/lib/libgrpcclient.so qa/clients/. && \
cp install/lib/libhttpclient.so qa/clients/. && \
cp install/python/*.py qa/clients/. && \
cp install/python/triton*.whl qa/pkgs/.
cp install/python/triton*.whl qa/pkgs/. && \
cp install/java/examples/*.jar qa/clients/.
RUN cp client/src/grpc_generated/go/*.go qa/L0_simple_go_client/. && \
cp -r client/src/grpc_generated/java qa/L0_client_java/.

Expand Down
23 changes: 18 additions & 5 deletions qa/L0_client_java/test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -71,26 +71,39 @@ if [ "$SERVER_PID" == "0" ]; then
exit 1
fi

pushd java/examples
set +e
pushd java/examples

# Test simple java client example
# Test grpc_generated simple java client example
mvn exec:java -Dexec.mainClass=clients.SimpleJavaClient -Dexec.args="localhost 8001" >> ${CLIENT_LOG}.java 2>&1
if [ $? -ne 0 ]; then
cat ${CLIENT_LOG}.java
RET=1
fi

# Test simple scala client example
# Test grpc_generated simple scala client example
mvn exec:java -Dexec.mainClass=clients.SimpleClient -Dexec.args="localhost 8001" >> ${CLIENT_LOG}.scala 2>&1
if [ $? -ne 0 ]; then
cat ${CLIENT_LOG}.scala
RET=1
fi

set -e
popd

# Test simple infer java client
SIMPLE_INFER_JAVA_CLIENT=../clients/SimpleInferClient.jar

pushd ../clients

java -jar ${SIMPLE_INFER_JAVA_CLIENT} >> ${CLIENT_LOG}.simple_infer_java 2>&1
if [ $? -ne 0 ]; then
cat ${CLIENT_LOG}.simple_infer_java
RET=1
fi

popd
set -e

kill $SERVER_PID
wait $SERVER_PID

Expand Down
20 changes: 19 additions & 1 deletion qa/L0_sdk/test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2019-2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -176,6 +176,24 @@ for l in $EXECUTABLES; do
fi
done

# Check java client
if [[ ! -e "triton_client/java/java-api-0.0.1.jar" ]]; then
echo -e "*** java-api-0.0.1.jar not present\n"
RET=1
fi
if [[ ! -e "triton_client/java/examples/MemoryGrowthTest.jar" ]]; then
echo -e "*** MemoryGrowthTest.jar not present\n"
RET=1
fi
if [[ ! -e "triton_client/java/examples/SimpleInferClient.jar" ]]; then
echo -e "*** SimpleInferClient.jar not present\n"
RET=1
fi
if [[ ! -e "triton_client/java/examples/SimpleInferPerf.jar" ]]; then
echo -e "*** SimpleInferPerf.jar not present\n"
RET=1
fi

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