Skip to content

Allow to set Shared Memory size (shmSize) for GenericContainer - #957

Merged
kiview merged 13 commits into
testcontainers:masterfrom
fzakaria:shmSize
Nov 26, 2018
Merged

Allow to set Shared Memory size (shmSize) for GenericContainer#957
kiview merged 13 commits into
testcontainers:masterfrom
fzakaria:shmSize

Conversation

@fzakaria

@fzakaria fzakaria commented Nov 5, 2018

Copy link
Copy Markdown
Contributor

Add the necessary code so that shmSize can be set on a GenericContainer.

This is especially useful for when starting Oracle docker images because they need at least 1GB of shared memory space.

docker run ... --shm-size=1g oracle/database:11.2.0.2-xe

Fixes #952

@rnorth

rnorth commented Nov 5, 2018

Copy link
Copy Markdown
Member

Thanks @fzakaria.

Looks like CircleCI had an unrelated glitch downloading the gradle wrapper so I've restarted the build.

@fzakaria

fzakaria commented Nov 5, 2018

Copy link
Copy Markdown
Contributor Author

Thanks @rnorth -- looks to have been resolved.

@fzakaria

fzakaria commented Nov 5, 2018

Copy link
Copy Markdown
Contributor Author

I updated the PR to have shmSize be simply bytes instead of 'megabytes' to avoid mebibyte vs megabyte confusion.

@testcontainers testcontainers deleted a comment Nov 5, 2018
@testcontainers testcontainers deleted a comment Nov 5, 2018
@testcontainers testcontainers deleted a comment from fzakaria Nov 5, 2018
@fzakaria

fzakaria commented Nov 6, 2018

Copy link
Copy Markdown
Contributor Author

Looks like travis-ci had a flaky failure pulling an artifact -- could someone restart.
I believe this PR is ready to merge; thanks.

Comment thread core/src/main/java/org/testcontainers/containers/GenericContainer.java Outdated

@kiview kiview left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've restarted Travis and added some comments up for discussion.

Comment thread core/src/test/java/org/testcontainers/junit/GenericContainerRuleTest.java Outdated
Comment thread core/src/main/java/org/testcontainers/containers/GenericContainer.java Outdated
Comment thread core/src/test/java/org/testcontainers/junit/GenericContainerRuleTest.java Outdated
@fzakaria

fzakaria commented Nov 6, 2018

Copy link
Copy Markdown
Contributor Author

Thanks for feedback @kiview -- I've addressed them with latest update.

  • moved to busybox + try-with-resources in the test
  • moved HostConfig to a buildHostConfig
  • removed extra assert

@kiview kiview left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great changes, thanks!
I found one more small thing in the Javadoc.

Comment thread core/src/main/java/org/testcontainers/containers/GenericContainer.java Outdated
…ner.java

Co-Authored-By: fzakaria <farid.m.zakaria@gmail.com>
Comment thread core/src/main/java/org/testcontainers/containers/GenericContainer.java Outdated
@fzakaria

fzakaria commented Nov 6, 2018

Copy link
Copy Markdown
Contributor Author

Updated @kiview .

Comment thread core/src/main/java/org/testcontainers/containers/GenericContainer.java Outdated
Co-Authored-By: fzakaria <farid.m.zakaria@gmail.com>
@fzakaria

Copy link
Copy Markdown
Contributor Author

@kiview What's next step to get this merged & published?

@kiview

kiview commented Nov 15, 2018

Copy link
Copy Markdown
Member

Hey @fzakaria, sorry for letting this hanging, I think it's good to go.
I'll ping the others about final feedback and then we can merge.

Comment thread core/src/main/java/org/testcontainers/containers/GenericContainer.java Outdated
@fzakaria

Copy link
Copy Markdown
Contributor Author

@bsideup made changes requested.

@fzakaria

Copy link
Copy Markdown
Contributor Author

Update on this ? Quite a lot of effort to get a helpful change in.
I might abandon the process soon.

@kiview kiview left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @fzakaria,
as said before, thanks for the PR.

I can understand your frustration, but please keep in mind, that we are working on Testcontainers in our spare time. As such, there might be periods of time, were each of us can't invest the time we'd like to ideally invest into the project.

I have requested a tiny change (remove blank lines to reduce the diff) and then I'll merge directly.

Comment thread core/src/main/java/org/testcontainers/containers/GenericContainer.java Outdated
Comment thread core/src/main/java/org/testcontainers/containers/GenericContainer.java Outdated
kiview and others added 2 commits November 26, 2018 07:18
…ner.java

Co-Authored-By: fzakaria <farid.m.zakaria@gmail.com>
…ner.java

Co-Authored-By: fzakaria <farid.m.zakaria@gmail.com>
@fzakaria

Copy link
Copy Markdown
Contributor Author

@kiview thanks.
Sorry for the attitude -- other stuff that day was likely getting to me.

@kiview kiview added this to the next milestone Nov 26, 2018
@kiview

kiview commented Nov 26, 2018

Copy link
Copy Markdown
Member

Travis failure unrelated, restarted.

@kiview
kiview merged commit 58a6c69 into testcontainers:master Nov 26, 2018
@kiview

kiview commented Nov 26, 2018

Copy link
Copy Markdown
Member

@fzakaria merged, thanks a lot for the great PR as well as your patience 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants