diff --git a/extensions/flyway/deployment/src/test/java/io/quarkus/flyway/test/FlywayDevModeCreateFromHibernateTest.java b/extensions/flyway/deployment/src/test/java/io/quarkus/flyway/test/FlywayDevModeCreateFromHibernateTest.java index 1a6e6829e0700..173d1cf53d841 100644 --- a/extensions/flyway/deployment/src/test/java/io/quarkus/flyway/test/FlywayDevModeCreateFromHibernateTest.java +++ b/extensions/flyway/deployment/src/test/java/io/quarkus/flyway/test/FlywayDevModeCreateFromHibernateTest.java @@ -45,7 +45,7 @@ public void testGenerateMigrationFromHibernate() throws Exception { RestAssured.get("fruit").then().statusCode(200) .body("[0].name", CoreMatchers.is("Orange")); - Map params = Map.of("ds", ""); + Map params = Map.of("ds", ""); JsonNode devuiresponse = super.executeJsonRPCMethod("create", params); Assertions.assertNotNull(devuiresponse); diff --git a/extensions/hibernate-orm/deployment/src/test/java/io/quarkus/hibernate/orm/HibernateSchemaRecreateDevConsoleTestCase.java b/extensions/hibernate-orm/deployment/src/test/java/io/quarkus/hibernate/orm/HibernateSchemaRecreateDevConsoleTestCase.java index c31f7507c1468..edcf67f16c675 100644 --- a/extensions/hibernate-orm/deployment/src/test/java/io/quarkus/hibernate/orm/HibernateSchemaRecreateDevConsoleTestCase.java +++ b/extensions/hibernate-orm/deployment/src/test/java/io/quarkus/hibernate/orm/HibernateSchemaRecreateDevConsoleTestCase.java @@ -32,7 +32,7 @@ public void testCleanDatabase() throws Exception { RestAssured.when().get("/my-entity/count").then().body(is("2")); RestAssured.when().get("/my-entity/add").then().body(is("MyEntity:added")); RestAssured.when().get("/my-entity/count").then().body(is("3")); - Map params = Map.of("ds", ""); + Map params = Map.of("ds", ""); JsonNode success = super.executeJsonRPCMethod("reset", params); assertTrue(success.asBoolean()); RestAssured.when().get("/my-entity/count").then().body(is("2")); diff --git a/extensions/vertx-http/dev-ui-tests/src/main/java/io/quarkus/devui/tests/DevUIJsonRPCTest.java b/extensions/vertx-http/dev-ui-tests/src/main/java/io/quarkus/devui/tests/DevUIJsonRPCTest.java index 3a18e793e5847..45791f5e27b86 100644 --- a/extensions/vertx-http/dev-ui-tests/src/main/java/io/quarkus/devui/tests/DevUIJsonRPCTest.java +++ b/extensions/vertx-http/dev-ui-tests/src/main/java/io/quarkus/devui/tests/DevUIJsonRPCTest.java @@ -59,7 +59,7 @@ public T executeJsonRPCMethod(TypeReference typeReference, String methodName } @SuppressWarnings("unchecked") - public T executeJsonRPCMethod(TypeReference typeReference, String methodName, Map params) + public T executeJsonRPCMethod(TypeReference typeReference, String methodName, Map params) throws Exception { int id = sendRequest(methodName, params); T response = getJsonRPCResponse(typeReference, id); @@ -71,7 +71,7 @@ public JsonNode executeJsonRPCMethod(String methodName) throws Exception { return executeJsonRPCMethod(methodName, null); } - public JsonNode executeJsonRPCMethod(String methodName, Map params) throws Exception { + public JsonNode executeJsonRPCMethod(String methodName, Map params) throws Exception { return executeJsonRPCMethod(JsonNode.class, methodName, params); } @@ -80,7 +80,7 @@ public T executeJsonRPCMethod(Class classType, String methodName) throws } @SuppressWarnings("unchecked") - public T executeJsonRPCMethod(Class classType, String methodName, Map params) throws Exception { + public T executeJsonRPCMethod(Class classType, String methodName, Map params) throws Exception { int id = sendRequest(methodName, params); T response = getJsonRPCResponse(classType, id); @@ -168,7 +168,7 @@ private JsonNode objectResultFromJsonRPC(int id, int loopCount) throws Interrupt } } - private String createJsonRPCRequest(int id, String methodName, Map params) throws IOException { + private String createJsonRPCRequest(int id, String methodName, Map params) throws IOException { ObjectNode request = mapper.createObjectNode(); @@ -177,15 +177,16 @@ private String createJsonRPCRequest(int id, String methodName, Map p : params.entrySet()) { - jsonParams.put(p.getKey(), p.getValue()); + for (Map.Entry p : params.entrySet()) { + JsonNode convertValue = mapper.convertValue(p.getValue(), JsonNode.class); + jsonParams.putIfAbsent(p.getKey(), convertValue); } } request.set("params", jsonParams); return mapper.writerWithDefaultPrettyPrinter().writeValueAsString(request); } - private int sendRequest(String methodName, Map params) throws IOException { + private int sendRequest(String methodName, Map params) throws IOException { int id = random.nextInt(Integer.MAX_VALUE); String request = createJsonRPCRequest(id, methodName, params); log.debug("request = " + request); diff --git a/integration-tests/devmode/src/test/java/io/quarkus/test/devui/DevUIGrpcSmokeTest.java b/integration-tests/devmode/src/test/java/io/quarkus/test/devui/DevUIGrpcSmokeTest.java index 3fc764660561a..a37b5a8fab5b1 100644 --- a/integration-tests/devmode/src/test/java/io/quarkus/test/devui/DevUIGrpcSmokeTest.java +++ b/integration-tests/devmode/src/test/java/io/quarkus/test/devui/DevUIGrpcSmokeTest.java @@ -64,7 +64,7 @@ public void testServices() throws Exception { @Test public void testTestService() throws Exception { - Map params = Map.of( + Map params = Map.of( "serviceName", "helloworld.Greeter", "methodName", "SayHello", "methodType", "UNARY",