Open ricardojoaoreis opened 7 years ago
I don't have issue on the spring data version I worked on today https://github.com/ldoguin/testcontainers-spring-data-couchbase
I'll give it a shot tomorrow.
Out of curiosity have you tried with bucket.bucketManager("Administrator","password")
?
Version 2.3.6 doesn't seem to have that method...
Trying openBucket("beer-samples", "password") also doesn't work because the bucket was created without a password...
Also, I was performing some more testing today and I actually get a ConnectionRefused exception on with the above code somewhere along the stack and it mentions port 8091 which seems strange to me, since it should connect to the mapped port... Someone mentioned I could edit the static_config file after setting up the cluster but I had no luck with that...
Regarding spring-data is that if you annotate a Repository with @ViewIndexed (to be able to use count() and findAll()) and have the IndexManager take care of the views for you like this:
@Bean(name = BeanNames.COUCHBASE_INDEX_MANAGER)
public IndexManager indexManager() {
return new IndexManager(true, true, true);
}
On IndexManager.java there's this line DesignDocument doc = manager.getDesignDocument(config.designDoc());
where the execution hangs...
I tried it on the other repo you linked by having the IndexManager like I told you and the UserRepository annotated with @ViewIndexed(designDoc = "userRepository" and I got the same problems that I have in my application... So maybe it's just a spring-data issue?
Version 2.3.6 doesn't seem to have that method...
I mixed up things with couchbaseCluster.clusterManager(clusterUser, clusterPassword), sorry. I also experienced timeout with Spring Data and I am looking into this.
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: