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
// ... 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.
69
+
30
70
31
71
## Adding this module to your project dependencies
0 commit comments