Commit 6982c90
committed
Add retry logic and additional wait time for FTPS server startup
The FTPS tests were experiencing timeout errors on CI when trying to connect
to the embedded FTP server. The issue was that the server was being started
but not fully ready to accept connections before the tests tried to connect.
Changes:
- Added retry loop (up to 2 seconds) to wait for server to not be stopped/suspended
- Added additional 200ms wait after server reports ready to ensure it's fully
accepting connections
- This prevents "Read timed out" errors when tests try to connect immediately
after server startup
The original code only waited 200ms if the server was stopped/suspended, but
didn't wait for the server to be fully ready. The new code:
1. Waits up to 2 seconds for server to start (checking every 100ms)
2. Then waits an additional 200ms for server to be fully ready
This should resolve the intermittent timeout failures on CI while maintaining
fast test execution when the server starts quickly.
Test results:
- Tests run: 2,556
- Failures: 0 ✅
- Errors: 0 ✅
- Skipped: 6121 parent 7854d69 commit 6982c90
File tree
1 file changed
+13
-2
lines changed- commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftps
1 file changed
+13
-2
lines changedcommons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftps/AbstractFtpsProviderTestCase.java
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
129 | 132 | | |
130 | | - | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
135 | 146 | | |
136 | 147 | | |
137 | 148 | | |
| |||
0 commit comments