-
Notifications
You must be signed in to change notification settings - Fork 5
Getting design documents fails when couchbase is running on docker #1
Copy link
Copy link
Open
Description
Hello,
Running the BucketManager.getDesignDocuments() fails with an InvocationTargetException
The message is java.lang.RuntimeException: java.net.ConnectException: Connection refused: localhost/127.0.0.1:8091
It seems that the client is still trying to connect to port 8091 somewhere...
I've tried with client versions 2.2.8 and 2.3.6
Here's a JUnit test demonstrating the problem:
package com.couchbase;
import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.CouchbaseCluster;
import com.couchbase.client.java.view.DesignDocument;
import org.junit.Assert;
import org.junit.ClassRule;
import org.junit.Test;
import java.util.List;
public class CouchbaseDesignDocumentsTest {
@ClassRule
public static CouchbaseContainer couchbase = new CouchbaseContainer()
.withBeerSample(true)
.withFTS(true)
.withIndex(true)
.withQuery(true)
.withKeyValue(true)
.withClusterUsername("Administrator")
.withClusterPassword("password");
@Test
public void testDesignDocuments() throws Exception {
CouchbaseCluster cc = couchbase.geCouchbaseCluster();
Bucket bucket = cc.openBucket("beer-sample");
List<DesignDocument> designDocuments = bucket.bucketManager().getDesignDocuments();
Assert.assertNotNull(designDocuments);
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels