File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
internal-packages/testcontainers/src Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,9 @@ const postgresContainer = async (
5353 try {
5454 await use ( container ) ;
5555 } finally {
56- await container . stop ( ) ;
56+ // WARNING: Testcontainers by default will not wait until the container has stopped. It will simply issue the stop command and return immediately.
57+ // If you need to wait for the container to be stopped, you can provide a timeout. The unit of timeout option here is second
58+ await container . stop ( { timeout : 10 } ) ;
5759 }
5860} ;
5961
@@ -92,7 +94,9 @@ const redisContainer = async (
9294 try {
9395 await use ( container ) ;
9496 } finally {
95- await container . stop ( ) ;
97+ // WARNING: Testcontainers by default will not wait until the container has stopped. It will simply issue the stop command and return immediately.
98+ // If you need to wait for the container to be stopped, you can provide a timeout. The unit of timeout option here is second
99+ await container . stop ( { timeout : 10 } ) ;
96100 }
97101} ;
98102
@@ -142,7 +146,10 @@ const electricOrigin = async (
142146 try {
143147 await use ( origin ) ;
144148 } finally {
145- await container . stop ( ) ;
149+ // WARNING: Testcontainers by default will not wait until the container has stopped. It will simply issue the stop command and return immediately.
150+ // If you need to wait for the container to be stopped, you can provide a timeout. The unit of timeout option here is second
151+
152+ await container . stop ( { timeout : 10 } ) ;
146153 }
147154} ;
148155
You can’t perform that action at this time.
0 commit comments