Can multiple threads start different containers concurrently? #694
Replies: 1 comment
-
Yes
By default, the containers will be assigned to random ports, so if the tests are failing it will be for another reason. I recommend you enable logging to see what exactly is going on.
If you are expecting to have different test suites spin up their own containers, then it should be desired behaviour for the container belonging to a test suite to be stopped when that test suite ends. I'm not sure what you mean by saying they're not properly isolated from each other. |
Beta Was this translation helpful? Give feedback.
-
Using Jest with many test files running concurrently, is it possible to start several testcontainers in different test files.
I have tried this using GenericContainer('mongo') but the tests fail, as it seems all the containers listen on one port, and when a suite ends, it closes the container. With this, the tests are not properly isolated from each other.
I saw a similar question in testcontainer-java section using Startables: testcontainers/testcontainers-java#6406
Is this possible in Node also?
Beta Was this translation helpful? Give feedback.
All reactions