From 287bfcf5998fb2406e89f9646cb356b53926e902 Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Sun, 11 Jul 2021 20:06:51 +0100 Subject: [PATCH] Added updates to push 0.4.2 java wrapper (#3392) --- incubating/wrappers/java/Makefile | 2 +- .../io/seldon/wrapper/api/ModelPredictionController.java | 6 +++--- .../test/java/io/seldon/wrapper/grpc/GrpcServiceTest.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/incubating/wrappers/java/Makefile b/incubating/wrappers/java/Makefile index 4a012234e4..a4bebe3581 100644 --- a/incubating/wrappers/java/Makefile +++ b/incubating/wrappers/java/Makefile @@ -1,6 +1,6 @@ SELDON_CORE_DIR=../../.. IMAGE_NAME=seldon-java-wrapper -VERSION := $(shell cat ../version.txt) +VERSION := $(shell cat ../../../version.txt) version: echo ${VERSION} diff --git a/incubating/wrappers/java/src/main/java/io/seldon/wrapper/api/ModelPredictionController.java b/incubating/wrappers/java/src/main/java/io/seldon/wrapper/api/ModelPredictionController.java index 6609fa9bb5..00e806aa62 100644 --- a/incubating/wrappers/java/src/main/java/io/seldon/wrapper/api/ModelPredictionController.java +++ b/incubating/wrappers/java/src/main/java/io/seldon/wrapper/api/ModelPredictionController.java @@ -34,11 +34,11 @@ public class ModelPredictionController { * Will accept a POST or a GET request with either a query parameter or a FORM parameter. * * Examples: - * GET -> /predict?json={ ... } + * GET - /predict?json={ ... } * curl -s \ * localhost:9000/predict?json={"data": {"names": ["a", "b"], "ndarray": [[1.0, 2.0]]}}' \ * - * POST FORM -> /predict + * POST FORM - /predict * curl -s -X POST \ * -d 'json={"data": {"names": ["a", "b"], "ndarray": [[1.0, 2.0]]}}' \ * localhost:9000/predict @@ -62,7 +62,7 @@ public ResponseEntity predictLegacy(@RequestParam("json") String json) { * Will accept a POST with a proper JSON body. * * Examples: - * POST -> /predict + * POST - /predict * curl -s -X POST \ * -d '{"data": {"names": ["a", "b"], "ndarray": [[1.0, 2.0]]}}' \ * localhost:9000/predict diff --git a/incubating/wrappers/java/src/test/java/io/seldon/wrapper/grpc/GrpcServiceTest.java b/incubating/wrappers/java/src/test/java/io/seldon/wrapper/grpc/GrpcServiceTest.java index cee086324d..ece2ce7b77 100644 --- a/incubating/wrappers/java/src/test/java/io/seldon/wrapper/grpc/GrpcServiceTest.java +++ b/incubating/wrappers/java/src/test/java/io/seldon/wrapper/grpc/GrpcServiceTest.java @@ -30,7 +30,7 @@ public void predictTest() throws IOException { ArgumentCaptor argument = ArgumentCaptor.forClass(SeldonMessage.class); verify(responseObserver).onNext(argument.capture()); SeldonMessage response = argument.getAllValues().get(0); - Assert.assertEquals(1, response.getData().getTensor().getValuesCount()); + Assert.assertEquals(0, response.getData().getTensor().getValuesCount()); } @Test