Commit 3e3e180
committed
Improve FTPS server shutdown to prevent port conflicts
Added more robust shutdown logic in AbstractFtpsProviderTestCase.tearDownClass():
- Wait 300ms after suspend() to allow active connections to finish
- Increased retry count from 10 to 20 for server stop wait
- Clear all static fields (socketPort, connectionUri) after shutdown
- Increased final wait from 500ms to 1000ms to ensure port is fully released
This helps prevent issues when running multiple FTPS test classes sequentially
in the same JVM, though the tests still work best when run in separate forks.1 parent 741eec7 commit 3e3e180
File tree
1 file changed
+24
-1
lines changed- commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftps
1 file changed
+24
-1
lines changedcommons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftps/AbstractFtpsProviderTestCase.java
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
157 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
158 | 168 | | |
159 | 169 | | |
160 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
161 | 173 | | |
162 | 174 | | |
163 | 175 | | |
| |||
167 | 179 | | |
168 | 180 | | |
169 | 181 | | |
| 182 | + | |
| 183 | + | |
170 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
171 | 194 | | |
172 | 195 | | |
173 | 196 | | |
| |||
0 commit comments