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 (
53
53
try {
54
54
await use ( container ) ;
55
55
} 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 } ) ;
57
59
}
58
60
} ;
59
61
@@ -92,7 +94,9 @@ const redisContainer = async (
92
94
try {
93
95
await use ( container ) ;
94
96
} 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 } ) ;
96
100
}
97
101
} ;
98
102
@@ -142,7 +146,10 @@ const electricOrigin = async (
142
146
try {
143
147
await use ( origin ) ;
144
148
} 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 } ) ;
146
153
}
147
154
} ;
148
155
You can’t perform that action at this time.
0 commit comments