Skip to content

Commit

Permalink
[cratedb] Enable single node by default (#7041)
Browse files Browse the repository at this point in the history
Pass `discovery.type=single-node` to `CrateDBContainer` to disable
bootstrap checks and prevent errors regarding low limit for
max virtual memory.

Upgrade CrateDB docker image to latest stable: 5.3.1

Fixes #7038
  • Loading branch information
matriv committed May 15, 2023
1 parent 993e986 commit be7cbe4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class CrateDBContainer extends JdbcDatabaseContainer<CrateDBContainer> {

static final String IMAGE = "crate";

static final String DEFAULT_TAG = "5.2.5";
static final String DEFAULT_TAG = "5.3.1";

private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("crate");

Expand All @@ -34,6 +34,7 @@ public CrateDBContainer(final String dockerImageName) {
public CrateDBContainer(final DockerImageName dockerImageName) {
super(dockerImageName);
dockerImageName.assertCompatibleWith(DEFAULT_IMAGE_NAME);
withCommand("crate -C discovery.type=single-node");

this.waitStrategy = Wait.forHttp("/").forPort(CRATEDB_HTTP_PORT).forStatusCode(200);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void testSimple() throws SQLException {
public void testCommandOverride() throws SQLException {
try (
CrateDBContainer cratedb = new CrateDBContainer(CrateDBTestImages.CRATEDB_TEST_IMAGE)
.withCommand("crate -C cluster.name=testcontainers")
.withCommand("crate -C discovery.type=single-node -C cluster.name=testcontainers")
) {
cratedb.start();

Expand Down

0 comments on commit be7cbe4

Please sign in to comment.