From beee713a7281ba6ee4eb7a103c3f2d9a7529833c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pupier?= Date: Wed, 27 May 2026 14:21:35 +0200 Subject: [PATCH] Make existing couchbase test passing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * use legacy and deprecated useView https://github.com/apache/camel/commit/fc0232611226784db75c75718969e22e86fb8424 * specify connectionString https://github.com/apache/camel/commit/6c2f45894a0d74ed353a5921111e2d9a37447e4b#diff-4eb6639d76f2cd4d5d9bcfc178e7c869a13b0b9533f96e7a6dc32102cd44ede6 the test is passing but there are a lot of errors and stacktraces in the log. Also in camel core, the integration tests are failing, see https://issues.apache.org/jira/browse/CAMEL-23625 Signed-off-by: Aurélien Pupier --- .../main/java/org/apache/camel/example/MyRouteBuilder.java | 2 +- couchbase-log/src/main/resources/application.properties | 1 + .../test/java/org/apache/camel/example/CouchbaseTest.java | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/couchbase-log/src/main/java/org/apache/camel/example/MyRouteBuilder.java b/couchbase-log/src/main/java/org/apache/camel/example/MyRouteBuilder.java index 91cec4b06..a828dd2bd 100644 --- a/couchbase-log/src/main/java/org/apache/camel/example/MyRouteBuilder.java +++ b/couchbase-log/src/main/java/org/apache/camel/example/MyRouteBuilder.java @@ -23,7 +23,7 @@ public class MyRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { - from("couchbase:http://{{couchbase.host}}:{{couchbase.port}}?bucket={{couchbase.bucket}}&username={{couchbase.username}}&password={{couchbase.password}}&consumerProcessedStrategy={{couchbase.consumerProcessedStrategy}}") + from("couchbase:http://{{couchbase.host}}:{{couchbase.port}}?bucket={{couchbase.bucket}}&username={{couchbase.username}}&password={{couchbase.password}}&consumerProcessedStrategy={{couchbase.consumerProcessedStrategy}}&useView=true&connectionString={{couchbase.connectionString}}") .to("log:info"); } diff --git a/couchbase-log/src/main/resources/application.properties b/couchbase-log/src/main/resources/application.properties index d9fbad393..dd6f965b9 100644 --- a/couchbase-log/src/main/resources/application.properties +++ b/couchbase-log/src/main/resources/application.properties @@ -21,6 +21,7 @@ camel.main.name = LogCouchbase couchbase.host=localhost couchbase.port=8091 +couchbase.connectionString=couchbase://localhost:11210 couchbase.username=admin couchbase.password=password couchbase.bucket=beer-sample diff --git a/couchbase-log/src/test/java/org/apache/camel/example/CouchbaseTest.java b/couchbase-log/src/test/java/org/apache/camel/example/CouchbaseTest.java index cf74a1c1d..8b320677b 100644 --- a/couchbase-log/src/test/java/org/apache/camel/example/CouchbaseTest.java +++ b/couchbase-log/src/test/java/org/apache/camel/example/CouchbaseTest.java @@ -26,6 +26,7 @@ import com.couchbase.client.java.json.JsonObject; import com.couchbase.client.java.manager.bucket.BucketSettings; import com.couchbase.client.java.manager.bucket.BucketType; +import com.couchbase.client.java.manager.bucket.StorageBackend; import com.couchbase.client.java.manager.view.DesignDocument; import com.couchbase.client.java.manager.view.View; import com.couchbase.client.java.view.DesignDocumentNamespace; @@ -68,7 +69,7 @@ static void init() { ) ); CLUSTER.buckets().createBucket( - BucketSettings.create(BUCKET).bucketType(BucketType.COUCHBASE).flushEnabled(true)); + BucketSettings.create(BUCKET).bucketType(BucketType.COUCHBASE).storageBackend(StorageBackend.COUCHSTORE).flushEnabled(true)); CLUSTER.bucket(BUCKET).viewIndexes().upsertDesignDocument(designDoc, DesignDocumentNamespace.PRODUCTION); } @@ -83,7 +84,9 @@ static void destroy() { @Override public void configureContext(CamelContextConfiguration camelContextConfiguration) { super.configureContext(camelContextConfiguration); + System.out.println("#### " + SERVICE.getConnectionString()); Properties overridenProperties = asProperties( + "couchbase.connectionString", SERVICE.getConnectionString(), "couchbase.host", SERVICE.hostname(), "couchbase.port", Integer.toString(SERVICE.port()), "couchbase.username", SERVICE.username(),