This is an automated email from the ASF dual-hosted git repository.
pjfanning pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-connectors.git
The following commit(s) were added to refs/heads/main by this push:
new 04678214a FTP: stop pure-ftpd DNS lookups and relax FtpWritingTest
timeouts (#1974)
04678214a is described below
commit 04678214a0af61fce4c2b423273f904cb7667c39
Author: PJ Fanning <[email protected]>
AuthorDate: Wed Sep 30 15:51:40 2026 +0100
FTP: stop pure-ftpd DNS lookups and relax FtpWritingTest timeouts (#1974)
Motivation:
FtpWritingTest failed on main with a TimeoutException in both tests. The
pure-ftpd container took ~5.7s to answer PASS (vs ~2.1s in the last green
run), which exceeded the tests' 5 second wait even though the upload
itself succeeded.
Modification:
- Add -H (don't resolve client host names) to the pure-ftpd ADDED_FLAGS
in docker-compose.yml.
- Wait up to 10 seconds in FtpWritingTest, matching CommonFtpStageTest.
Result:
FTP logins no longer wait on reverse DNS, and FtpWritingTest tolerates
a slow login.
Tests:
- Not run locally - Docker not available; relying on CI ftp job
References:
None - flaky run
https://github.com/apache/pekko-connectors/actions/runs/36719985704/job/109902785869
---
docker-compose.yml | 2 +-
ftp/src/test/java/docs/javadsl/FtpWritingTest.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docker-compose.yml b/docker-compose.yml
index 375ce234d..2649dac34 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -94,7 +94,7 @@ services:
# https://docs.docker.com/compose/environment-variables/
FTP_USER_UID: ${FTP_USER_UID:-2000}
FTP_USER_GID: ${FTP_USER_GID:-2000}
- ADDED_FLAGS: "--tls=1"
+ ADDED_FLAGS: "--tls=1 -H"
geode:
container_name: geode
image: raboof/geode:1.15.2
diff --git a/ftp/src/test/java/docs/javadsl/FtpWritingTest.java
b/ftp/src/test/java/docs/javadsl/FtpWritingTest.java
index 5fae2db20..93df42103 100644
--- a/ftp/src/test/java/docs/javadsl/FtpWritingTest.java
+++ b/ftp/src/test/java/docs/javadsl/FtpWritingTest.java
@@ -85,7 +85,7 @@ public class FtpWritingTest extends BaseFtpSupport {
.runWith(Ftp.toPath("file.txt", ftpSettings), materializer);
// #storing
- IOResult ioResult = result.toCompletableFuture().get(5, TimeUnit.SECONDS);
+ IOResult ioResult = result.toCompletableFuture().get(10, TimeUnit.SECONDS);
assertThat(ioResult, is(IOResult.createSuccessful(25)));
assertTrue(fileExists("file.txt"));
}
@@ -103,7 +103,7 @@ public class FtpWritingTest extends BaseFtpSupport {
.runWith(Ftp.toPath("file.txt.gz", ftpSettings), materializer);
// #storing
- IOResult ioResult = result.toCompletableFuture().get(5, TimeUnit.SECONDS);
+ IOResult ioResult = result.toCompletableFuture().get(10, TimeUnit.SECONDS);
assertThat(ioResult, is(IOResult.createSuccessful(50)));
assertTrue(fileExists("file.txt.gz"));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]