You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gi...@apache.org on 2025/05/08 01:54:46 UTC
(camel-quarkus) 06/24: Fixed google-bigquerry
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit a23dd7eb3b481d2579e49ad9b8e7f60c0ab52693
Author: Jiri Ondrusek <on...@gmail.com>
AuthorDate: Wed Apr 23 11:00:50 2025 +0200
Fixed google-bigquerry
---
.../component/google/bigquery/it/GoogleBigqueryResource.java | 5 +++--
.../quarkus/component/google/bigquery/it/GoogleBigqueryTest.java | 8 ++++++--
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/integration-tests/google-bigquery/src/main/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryResource.java b/integration-tests/google-bigquery/src/main/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryResource.java
index e4d4df3e55..8c9968d26a 100644
--- a/integration-tests/google-bigquery/src/main/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryResource.java
+++ b/integration-tests/google-bigquery/src/main/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryResource.java
@@ -101,7 +101,8 @@ public class GoogleBigqueryResource {
@Path("/executeSql")
@POST
@Consumes(MediaType.APPLICATION_JSON)
- public Long executeSql(Map<String, String> headers, @QueryParam("sql") String sql, @QueryParam("file") boolean file,
+ @Produces(MediaType.APPLICATION_JSON)
+ public Object executeSql(Map<String, String> headers, @QueryParam("sql") String sql, @QueryParam("file") boolean file,
@QueryParam("body") String body)
throws IOException {
String uri = "google-bigquery-sql://" + projectId + ":";
@@ -138,7 +139,7 @@ public class GoogleBigqueryResource {
}
return producerTemplate.requestBodyAndHeaders(uri, bodyMap, typedHeaders,
- Long.class);
+ Object.class);
}
@Produces
diff --git a/integration-tests/google-bigquery/src/test/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryTest.java b/integration-tests/google-bigquery/src/test/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryTest.java
index 8d0da04932..c99fe782cb 100644
--- a/integration-tests/google-bigquery/src/test/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryTest.java
+++ b/integration-tests/google-bigquery/src/test/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryTest.java
@@ -48,7 +48,7 @@ import org.junit.jupiter.api.Test;
import static org.apache.camel.util.CollectionHelper.mapOf;
import static org.apache.camel.util.CollectionHelper.mergeMaps;
-import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.*;
@QuarkusTest
@TestHTTPEndpoint(GoogleBigqueryResource.class)
@@ -317,7 +317,11 @@ class GoogleBigqueryTest {
.post("executeSql")
.then()
.statusCode(200)
- .body(is("2"));
+ .body("", hasItems(
+ allOf(hasEntry("id", "1"), hasEntry("col1", "2"), hasEntry("col2", "3")),
+ allOf(hasEntry("id", "2"), hasEntry("col1", "3"), hasEntry("col2", "4"))
+ ));
+// .body(conis("2"));
//update
RestAssured.given()