Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(Azurite): Add in-memory support #1063

Merged
merged 8 commits into from
Dec 6, 2023

Conversation

Xzelsius
Copy link
Contributor

@Xzelsius Xzelsius commented Dec 1, 2023

What does this PR do?

Updates the default Azurite image to v3.28.0
Additionally, adds support for the new in-memory persistence flag --inMemoryPersistence

The new in-memory persistence is opt-in and needs to be enabled using .WithInMemoryPersistence() on the Azurite builder.
As default, the memory limit is 50% of the available Docker host RAM, but it can be overridden by specifying it in the .WithInMemoryPersistence(<memory-limit-in-mb>) call.

Why is it important?

Using in-memory persistence may have a positive effect on overall performance of Azurite during tests, as it does not need to store stuff on disk.

Related issues

Copy link

netlify bot commented Dec 1, 2023

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 36d7b23
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/6570bbcd70ae840008dd1442
😎 Deploy Preview https://deploy-preview-1063--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

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

Thanks for the PR 👍 I have some minor change requests, but overall, it looks really good. I will be happy to merge it once the requested changes are addressed.

src/Testcontainers.Azurite/AzuriteBuilder.cs Outdated Show resolved Hide resolved
src/Testcontainers.Azurite/AzuriteBuilder.cs Outdated Show resolved Hide resolved
src/Testcontainers.Azurite/AzuriteBuilder.cs Outdated Show resolved Hide resolved
src/Testcontainers.Azurite/AzuriteConfiguration.cs Outdated Show resolved Hide resolved
@Xzelsius Xzelsius changed the title Update Azurite to 3.28.0 and add support for --inMemoryPersistence feat: Update Azurite to 3.28.0 and add support for --inMemoryPersistence Dec 4, 2023
@HofmeisterAn HofmeisterAn added the enhancement New feature or request label Dec 5, 2023
@HofmeisterAn HofmeisterAn changed the title feat: Update Azurite to 3.28.0 and add support for --inMemoryPersistence feat(Azurite): Add in-memory support Dec 5, 2023
@HofmeisterAn HofmeisterAn changed the base branch from develop to main December 5, 2023 16:57
@HofmeisterAn HofmeisterAn changed the base branch from main to develop December 5, 2023 16:57
@HofmeisterAn
Copy link
Collaborator

I made slight changes to the tests. Instead of creating a new class, we can reuse the previous test class. Does the PR look good to you? What do you think? I am ready to merge it. Thanks for your contribution.

@Xzelsius
Copy link
Contributor Author

Xzelsius commented Dec 5, 2023

@HofmeisterAn That's actually a way better solution than what I did with the test :)
Looks good to me 👍

HofmeisterAn
HofmeisterAn previously approved these changes Dec 6, 2023
Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

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

Thanks for creating the issue and PR 🙏.

@HofmeisterAn HofmeisterAn merged commit 4e20ad9 into testcontainers:develop Dec 6, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Upgrade to Azurite >= 3.28.0 and support in-memory persistence
2 participants