Commit f589e60
Fix java.net.SocketException exception in CouchbaseContainer.stop() (#859)
Motivation
==========
When stop() was called without a prior call to
createCouchbaseEnvironment(), it would throw a SocketException
because stopCluster() would end up trying to initialize the cluster
at the same time the container is being shut down.
Modifications
=============
Call stopCluster() before stopping the container, instead of in
parallel.
Result
======
stopCluster() might still call createCouchbaseEnvironment(),
but the call succeeds and the environment is immediately cleaned up.1 parent b5564a5 commit f589e60
2 files changed
Lines changed: 9 additions & 1 deletion
File tree
- modules/couchbase/src
- main/java/org/testcontainers/couchbase
- test/java/org/testcontainers/couchbase
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
| 184 | + | |
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
0 commit comments