Couchbase容器:无法使用带有spring-data-coucbase的junit和spring boot在集成测试中插入存储桶错误

时间:2018-06-01 05:10:38

标签: docker integration-testing couchbase spring-data-couchbase

在使用couchbase/server:latest docker image with environment。

的集成测试中使用couchbase容器
CouchbaseEnvironment couchbaseEnvironment = DefaultCouchbaseEnvironment.builder()
                    .bootstrapCarrierDirectPort(getMappedPort(11210))
                    .bootstrapCarrierSslPort(getMappedPort(11207))
                    .bootstrapHttpDirectPort(getMappedPort(8091))
                    .bootstrapHttpSslPort(getMappedPort(18091))
                    .build();

gradle中的依赖

testCompile group: 'org.testcontainers', name: 'testcontainers', version: '1.5.1'
testCompile group: 'com.couchbase.client', name: 'java-client', version: '2.5.7'

运行测试时会出现以下错误。

Caused by: com.couchbase.client.core.CouchbaseException: Could not insert bucket: {"errors":{"proxyPort":"The port number must be greater than 1023 and less than 65536."},"summaries":{"ramSummary":{"total":419430400,"otherBuckets":0,"nodesCount":1,"perNodeMegs":100,"thisAlloc":104857600,"thisUsed":0,"free":314572800},"hddSummary":{"total":67371577344,"otherData":22906336296,"otherBuckets":0,"thisUsed":0,"free":44465241048}}}

0 个答案:

没有答案