This is an automated email from the ASF dual-hosted git repository.

jiriondrusek pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit c5731d3f380284f30b407a2afa5374a60dcb98e6
Author: Jiri Ondrusek <ondrusek.j...@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()

Reply via email to