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

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


The following commit(s) were added to refs/heads/main by this push:
     new ff7d4e2721e9 CAMEL-23625: Fix Couchbase integration test failures 
(#29506)
ff7d4e2721e9 is described below

commit ff7d4e2721e937ee953ca2912ab93be8be7ffd72
Author: Guillaume Nodet <[email protected]>
AuthorDate: Tue Nov 10 13:52:43 2026 +0100

    CAMEL-23625: Fix Couchbase integration test failures (#29506)
    
    The Couchbase SDK's Cluster.connect() returns before the cluster is ready,
    so bucket creation, the design document upsert and query index creation
    could fail with ServiceNotAvailableException. Wait for the cluster and the
    bucket to be ready in the tests, and run ConsumeSqlQueryIT on the default
    8.0.3 container (SQL++ needs 8.0+).
---
 .../camel/component/couchbase/integration/ConsumeSqlQueryIT.java      | 4 +---
 .../component/couchbase/integration/CouchbaseIntegrationTestBase.java | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ConsumeSqlQueryIT.java
 
b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ConsumeSqlQueryIT.java
index fadcc9df2421..3881ae91c658 100644
--- 
a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ConsumeSqlQueryIT.java
+++ 
b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ConsumeSqlQueryIT.java
@@ -35,8 +35,6 @@ import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Tag;
-import org.junit.jupiter.api.Tags;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
 import org.junit.jupiter.api.extension.RegisterExtension;
@@ -46,7 +44,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 
 @DisabledIfSystemProperty(named = "ci.env.name", matches = ".*",
                           disabledReason = "Too resource intensive for most 
systems to run reliably")
-@Tags({ @Tag("couchbase-71") })
 public class ConsumeSqlQueryIT extends CamelTestSupport {
 
     @RegisterExtension
@@ -59,6 +56,7 @@ public class ConsumeSqlQueryIT extends CamelTestSupport {
     static void setUpCouchbase() {
         bucketName = "sqlBucket" + TestUtils.randomWithRange(0, 100);
         cluster = Cluster.connect(service.getConnectionString(), 
service.getUsername(), service.getPassword());
+        cluster.waitUntilReady(Duration.ofSeconds(30));
 
         // Create bucket without specifying storage backend (uses server 
default — Magma on 8.0+)
         cluster.buckets().createBucket(
diff --git 
a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/CouchbaseIntegrationTestBase.java
 
b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/CouchbaseIntegrationTestBase.java
index e023a686705c..85abeaf4ed9a 100644
--- 
a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/CouchbaseIntegrationTestBase.java
+++ 
b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/CouchbaseIntegrationTestBase.java
@@ -52,7 +52,7 @@ public class CouchbaseIntegrationTestBase extends 
CamelTestSupport {
                 
BucketSettings.create(bucketName).bucketType(BucketType.COUCHBASE)
                         
.storageBackend(StorageBackend.COUCHSTORE).flushEnabled(true));
 
-        cluster.bucket(bucketName);
+        cluster.bucket(bucketName).waitUntilReady(Duration.ofSeconds(30));
         DesignDocument designDoc = new DesignDocument(
                 bucketName,
                 Collections.singletonMap(bucketName, new View("function (doc, 
meta) {  emit(meta.id, doc);}")));

Reply via email to