Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions modules/couchbase/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ dependencies {
// TODO use JDK's HTTP client and/or Apache HttpClient5
shaded 'com.squareup.okhttp3:okhttp:5.1.0'

testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.11.0'

testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4'
testImplementation 'com.couchbase.client:java-client:3.9.0'
testImplementation 'org.awaitility:awaitility:4.3.0'
testImplementation 'org.assertj:assertj-core:3.27.4'
Expand All @@ -15,3 +18,7 @@ tasks.japicmp {
"org.testcontainers.couchbase.CouchbaseContainer"
]
}

test {
useJUnitPlatform()
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.couchbase.client.java.Cluster;
import com.couchbase.client.java.Collection;
import com.couchbase.client.java.json.JsonObject;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.ContainerLaunchException;

import java.time.Duration;
Expand All @@ -30,7 +30,7 @@
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.awaitility.Awaitility.await;

public class CouchbaseContainerTest {
class CouchbaseContainerTest {

private static final String COUCHBASE_IMAGE_ENTERPRISE = "couchbase/server:enterprise-7.0.3";

Expand All @@ -41,22 +41,22 @@ public class CouchbaseContainerTest {
private static final String COUCHBASE_IMAGE_COMMUNITY_RECENT = "couchbase/server:community-7.6.2";

@Test
public void testBasicContainerUsageForEnterpriseContainer() {
void testBasicContainerUsageForEnterpriseContainer() {
testBasicContainerUsage(COUCHBASE_IMAGE_ENTERPRISE);
}

@Test
public void testBasicContainerUsageForEnterpriseContainerRecent() {
void testBasicContainerUsageForEnterpriseContainerRecent() {
testBasicContainerUsage(COUCHBASE_IMAGE_ENTERPRISE_RECENT);
}

@Test
public void testBasicContainerUsageForCommunityContainer() {
void testBasicContainerUsageForCommunityContainer() {
testBasicContainerUsage(COUCHBASE_IMAGE_COMMUNITY);
}

@Test
public void testBasicContainerUsageForCommunityContainerRecent() {
void testBasicContainerUsageForCommunityContainerRecent() {
testBasicContainerUsage(COUCHBASE_IMAGE_COMMUNITY_RECENT);
}

Expand Down Expand Up @@ -89,7 +89,7 @@ private void testBasicContainerUsage(String couchbaseImage) {
}

@Test
public void testBucketIsFlushableIfEnabled() {
void testBucketIsFlushableIfEnabled() {
BucketDefinition bucketDefinition = new BucketDefinition("mybucket").withFlushEnabled(true);

try (
Expand Down Expand Up @@ -119,7 +119,7 @@ public void testBucketIsFlushableIfEnabled() {
* edition which is not supported.
*/
@Test
public void testFailureIfCommunityUsedWithAnalytics() {
void testFailureIfCommunityUsedWithAnalytics() {
try (
CouchbaseContainer container = new CouchbaseContainer(COUCHBASE_IMAGE_COMMUNITY)
.withEnabledServices(CouchbaseService.KV, CouchbaseService.ANALYTICS)
Expand All @@ -136,7 +136,7 @@ public void testFailureIfCommunityUsedWithAnalytics() {
* edition which is not supported.
*/
@Test
public void testFailureIfCommunityUsedWithEventing() {
void testFailureIfCommunityUsedWithEventing() {
try (
CouchbaseContainer container = new CouchbaseContainer(COUCHBASE_IMAGE_COMMUNITY)
.withEnabledServices(CouchbaseService.KV, CouchbaseService.EVENTING)
Expand Down
Loading