You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/03/11 13:39:14 UTC

[GitHub] [camel-quarkus] zbendhiba commented on a change in pull request #2327: couchbase JVM : add integration tests fixes #2326

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



##########
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");

Review comment:
       thanks!! no it's a bug. I've corrected the logs, but then I revert the code. So thanks for pointing out this one




----------------------------------------------------------------
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:
users@infra.apache.org