0

hi i have the following:

@Testcontainers
@Slf4j
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class IntegrationTestContainerSetup {

    @Container
    static final PostgreSQLContainer POSTGRES_CONTAINER = new......;

    @Container
    public static final S3MockContainer s3Container = new....

The above doest work for some reason, the postgresql never gets spun up., if i remove the s3 container outside into its own class and extend this as sub class to the new class. it works fine.. I dont understand why that would be the case.. can one class only have one container annotation?

user1555190
  • 2,803
  • 8
  • 47
  • 80
  • 1
    I have projects configured with up to 4 containers using the annotation and it works fine. Can you share more about your test or share a github repository with a minimal reproducer to take a look? – Eddú Meléndez Oct 25 '22 at 16:33

0 Answers0