Skip to content

Commit

Permalink
Increase robustness of couchbase tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerschtli committed Jun 23, 2021
1 parent 351d521 commit c882cd1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.junit.Test;
import org.testcontainers.utility.DockerImageName;

import java.time.Duration;
import java.util.function.Consumer;

import static org.junit.Assert.assertEquals;
Expand All @@ -46,6 +47,8 @@ public void testBasicContainerUsage() {
) {
setUpClient(container, cluster -> {
Bucket bucket = cluster.bucket(bucketDefinition.getName());
bucket.waitUntilReady(Duration.ofSeconds(10L));

Collection collection = bucket.defaultCollection();

collection.upsert("foo", JsonObject.create().put("key", "value"));
Expand All @@ -68,6 +71,8 @@ public void testBucketIsFlushableIfEnabled() {
) {
setUpClient(container, cluster -> {
Bucket bucket = cluster.bucket(bucketDefinition.getName());
bucket.waitUntilReady(Duration.ofSeconds(10L));

Collection collection = bucket.defaultCollection();

collection.upsert("foo", JsonObject.create().put("key", "value"));
Expand Down

0 comments on commit c882cd1

Please sign in to comment.