Relative Content

Tag Archive for testcontainerstestcontainers-junit5spring-boot-testcontainers

Buildup of testcontainers (and memory consumption) when using Singleton Containers

If we follow the recommendations outlined in A common misconfiguration of Singleton Containers, where we use @BeforeAll to start containers (instead of @Testcontainers, @Container, and @DynamicPropertySouce), the container instances created across multiple tests build up until all tests have been run, consuming a massive amount of memory. It is only after all tests have been run that Ryuk via it’s container reaper process cleans them up. Is there any way to configure Ryuk to remove each container at the end of every test class completion so that the testcontainers don’t pile up and consume a massive amount of memory?

Testcontainers, getting error while pulling image testcontainers/ryuk:0.3.4

I am working on testcontainers with spring boot. Until last week, it was working fine and all of a sudden i started getting below error when running test cases. It seems when test container try to download ryuk:0.3.4 image, it gets time out error. Not sure why it started happening which was working fine.