From 05660fbd74490d73a77d69771fb5be3d2baabd49 Mon Sep 17 00:00:00 2001 From: Otavio Rodolfo Piske Date: Mon, 29 Aug 2022 11:28:16 +0200 Subject: [PATCH] Do wait for started before running the test --- .../couchbase/integration/CouchbaseIntegrationTestBase.java | 5 +++++ 1 file changed, 5 insertions(+) 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 f0b5c5bad1cef..27d021984c9a2 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 @@ -33,6 +33,7 @@ import org.apache.camel.test.junit5.CamelTestSupport; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.extension.RegisterExtension; public class CouchbaseIntegrationTestBase extends CamelTestSupport { @@ -55,6 +56,10 @@ static void setUpCouchbase() { bucketName, Collections.singletonMap(bucketName, new View("function (doc, meta) { emit(meta.id, doc);}"))); cluster.bucket(bucketName).viewIndexes().upsertDesignDocument(designDoc, DesignDocumentNamespace.PRODUCTION); + } + + @BeforeEach + public void waitForStarted() { cluster.bucket(bucketName).waitUntilReady(Duration.ofSeconds(30)); }