You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/12/15 05:31:30 UTC
[camel] branch master updated: Fix upsert timeouts issues when
using the couchbase test-infra (#4764)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 077cf4a Fix upsert timeouts issues when using the couchbase test-infra (#4764)
077cf4a is described below
commit 077cf4a93cc92a614c455a423bdf17cdc5e739c4
Author: Otavio Rodolfo Piske <or...@users.noreply.github.com>
AuthorDate: Tue Dec 15 06:25:10 2020 +0100
Fix upsert timeouts issues when using the couchbase test-infra (#4764)
Ensure other couchbase services use fixed ports otherwise some tests may
throw timeout issues when querying or searching for data
---
.../services/CouchbaseLocalContainerService.java | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/test-infra/camel-test-infra-couchbase/src/test/java/org/apache/camel/test/infra/couchbase/services/CouchbaseLocalContainerService.java b/test-infra/camel-test-infra-couchbase/src/test/java/org/apache/camel/test/infra/couchbase/services/CouchbaseLocalContainerService.java
index 7e799db..dd64ee5 100644
--- a/test-infra/camel-test-infra-couchbase/src/test/java/org/apache/camel/test/infra/couchbase/services/CouchbaseLocalContainerService.java
+++ b/test-infra/camel-test-infra-couchbase/src/test/java/org/apache/camel/test/infra/couchbase/services/CouchbaseLocalContainerService.java
@@ -17,13 +17,14 @@
package org.apache.camel.test.infra.couchbase.services;
+import org.apache.camel.test.infra.common.services.ContainerService;
import org.apache.camel.test.infra.couchbase.common.CouchbaseProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.couchbase.BucketDefinition;
import org.testcontainers.couchbase.CouchbaseContainer;
-public class CouchbaseLocalContainerService implements CouchbaseService {
+public class CouchbaseLocalContainerService implements CouchbaseService, ContainerService<CouchbaseContainer> {
/*
* Couchbase container uses a dynamic port for the KV service. The configuration
@@ -33,8 +34,22 @@ public class CouchbaseLocalContainerService implements CouchbaseService {
*/
private class CustomCouchbaseContainer extends CouchbaseContainer {
public CustomCouchbaseContainer() {
+ super("couchbase/server:6.5.1");
+
final int kvPort = 11210;
addFixedExposedPort(kvPort, kvPort);
+
+ final int managementPort = 8091;
+ addFixedExposedPort(managementPort, managementPort);
+
+ final int viewPort = 8092;
+ addFixedExposedPort(viewPort, viewPort);
+
+ final int queryPort = 8093;
+ addFixedExposedPort(queryPort, queryPort);
+
+ final int searchPort = 8094;
+ addFixedExposedPort(searchPort, searchPort);
}
}
@@ -97,4 +112,9 @@ public class CouchbaseLocalContainerService implements CouchbaseService {
public void shutdown() {
container.stop();
}
+
+ @Override
+ public CouchbaseContainer getContainer() {
+ return container;
+ }
}