You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Rewrite couchbase module. closestestcontainers#2447
This changeset completely reworks the couchbase module and hopefully
greatly improve the out-of-the-box experience. Note that this is a
breaking change over the previous code because by intention it does
NOT depend on SDK 2 so you can test SDK 2 and 3 with it at the same
time.
Highlights:
- Removed the need for a SDK, so both 2 and 3 can be used with it.
- Updated to 6.5.0 baseline and using alternate addresses for
"proper" port exposure without having to rely on the socat
proxy container like the previous version had to.
- Allows to define which services should be exposed and handles
states automatically (i.e. will not try to create the primary
index if the query service is not enabled).
Note that a bunch of tests have been removed since they are not
adequate anymore. A side effect of the alternate address change
is that older servers cannot be used. 6.5.0 is available in both
CE and EE, and Couchbase in general allows EE versions to be used
in development and testing so we should use it if we can.
* Wait until query respsonds with 200
* fixes
* add `getBootstrap*DirectPort()` methods, review fixes
* Restore `getConnectionString()`
* Apply suggestions from code review
Co-Authored-By: Kevin Wittek <[email protected]>
* Update docs
* Update docs (2)
Co-authored-by: Michael Nitschinger <[email protected]>
Co-authored-by: Kevin Wittek <[email protected]>
// ... interact with client as if using Couchbase normally
32
-
}
33
-
}
34
-
```
35
-
36
-
### Use preconfigured default bucket
37
-
38
-
Bucket is cleared after each test
39
-
40
-
```java
41
-
publicclassSomeTestextendsAbstractCouchbaseTest {
42
-
43
-
@Test
44
-
publicvoidsomeTestMethod() {
45
-
Bucket bucket = getBucket();
46
-
47
-
// ... interact with client as if using Couchbase normally
48
-
}
49
-
}
50
-
```
51
-
52
-
### Special consideration
53
-
54
-
Couchbase container is configured to use random available [ports](https://developer.couchbase.com/documentation/server/current/install/install-ports.html) for some ports only, as [Couchbase Java SDK](https://developer.couchbase.com/documentation/server/current/sdk/java/start-using-sdk.html) permit to configure only some ports:
All other ports cannot be changed by Java SDK, there are sadly fixed:
62
-
63
-
-**8092** : Queries, views, XDCR
64
-
-**8093** : REST/HTTP Query service
65
-
-**8094** : REST/HTTP Search Service
66
-
-**8095** : REST/HTTP Analytic service
67
-
68
-
So if you disable Query, Search and Analytic service, you can run multiple instance of this container, otherwise, you're stuck with one instance, for now.
0 commit comments