Skip to content

Commit

Permalink
Disable bootstrap checks for CrateDB
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 14, 2023
1 parent e023920 commit 5fa1c3a
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 5fa1c3a

Please sign in to comment.