Skip to content

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

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

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

Conversation

@fzakaria
Copy link
Copy Markdown
Contributor

@fzakaria fzakaria commented Nov 5, 2018

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
Copy link
Copy Markdown
Member

rnorth commented Nov 5, 2018

Thanks @fzakaria.

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

@fzakaria
Copy link
Copy Markdown
Contributor Author

fzakaria commented Nov 5, 2018

Thanks @rnorth -- looks to have been resolved.

@fzakaria
Copy link
Copy Markdown
Contributor Author

fzakaria commented Nov 5, 2018

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
Copy link
Copy Markdown
Contributor Author

fzakaria commented Nov 6, 2018

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

Copy link
Copy Markdown
Member

@kiview kiview left a comment

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.

@fzakaria
Copy link
Copy Markdown
Contributor Author

fzakaria commented Nov 6, 2018

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

Copy link
Copy Markdown
Member

@kiview kiview left a comment

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.

@fzakaria
Copy link
Copy Markdown
Contributor Author

fzakaria commented Nov 6, 2018

Updated @kiview .

@fzakaria
Copy link
Copy Markdown
Contributor Author

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

@kiview
Copy link
Copy Markdown
Member

kiview commented Nov 15, 2018

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.

@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.

Copy link
Copy Markdown
Member

@kiview kiview left a comment

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.

@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
Copy link
Copy Markdown
Member

kiview commented Nov 26, 2018

Travis failure unrelated, restarted.

@kiview kiview merged commit 58a6c69 into testcontainers:master Nov 26, 2018
@kiview
Copy link
Copy Markdown
Member

kiview commented Nov 26, 2018

@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