Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support random ports via - .port(0) #76

Closed
rbygrave opened this issue May 12, 2022 · 0 comments
Closed

Support random ports via - .port(0) #76

rbygrave opened this issue May 12, 2022 · 0 comments
Assignees
Milestone

Comments

@rbygrave
Copy link
Member

rbygrave commented May 12, 2022

    RedisContainer container = RedisContainer.builder("latest")
      .port(0)
      .build();

    container.start();
    int port = container.port();
    LocalstackContainer container = LocalstackContainer.builder("0.14")
      .port(0)
      .build();

    container.start();

    // int assignedPort = container.port();

    AmazonDynamoDB amazonDynamoDB = container.dynamoDB();
    createTable(amazonDynamoDB);
    ...
@rbygrave rbygrave added this to the 5.2 milestone May 12, 2022
@rbygrave rbygrave self-assigned this May 12, 2022
rbygrave added a commit that referenced this issue May 12, 2022
@rbygrave rbygrave changed the title Support random ports Support random ports via - .port(0) May 12, 2022
rbygrave added a commit that referenced this issue May 12, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant