aldettinger commented on a change in pull request #2327:
URL: https://github.com/apache/camel-quarkus/pull/2327#discussion_r591741413



##########
File path: 
extensions-jvm/couchbase/integration-test/src/main/java/org/apache/camel/quarkus/component/couchbase/it/CouchbaseResource.java
##########
@@ -18,34 +18,80 @@
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
 import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
 
-import org.apache.camel.CamelContext;
+import com.couchbase.client.java.kv.GetResult;
+import org.apache.camel.ConsumerTemplate;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.couchbase.CouchbaseConstants;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
 import org.jboss.logging.Logger;
 
+import static 
org.apache.camel.component.couchbase.CouchbaseConstants.COUCHBASE_DELETE;
+import static 
org.apache.camel.component.couchbase.CouchbaseConstants.COUCHBASE_GET;
+
 @Path("/couchbase")
 @ApplicationScoped
+@Consumes(MediaType.TEXT_PLAIN)
 public class CouchbaseResource {
 
     private static final Logger LOG = 
Logger.getLogger(CouchbaseResource.class);
+    private static final long TIMEOUT = 100000;
 
-    private static final String COMPONENT_COUCHBASE = "couchbase";
     @Inject
-    CamelContext context;
+    ProducerTemplate producerTemplate;
+    @Inject
+    ConsumerTemplate consumerTemplate;
+
+    @ConfigProperty(name = "couchbase.connection.uri")
+    String connectionUri;
+    @ConfigProperty(name = "couchbase.bucket.name")
+    String bucketName;
+
+    @PUT
+    @Path("id/{id}")
+    @Produces(MediaType.TEXT_PLAIN)
+    public boolean insert(@PathParam("id") String id, String msg) {
+        LOG.infof("inserting message %msg with id %id");
+        String endpoint = String.format("%s&queryTimeout=%s", connectionUri, 
TIMEOUT);
+        return producerTemplate.requestBodyAndHeader(endpoint, msg, 
CouchbaseConstants.HEADER_ID, id, Boolean.class);
+    }
+
+    @GET
+    @Path("{id}")
+    @Produces(MediaType.TEXT_PLAIN)
+    public String getById(@PathParam("id") String id) {
+        LOG.infof("Getting object with id : %s");

Review comment:
       I may have spotted a missing parameter ? the same happen for other logs 
statements.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to