The connect timeout is hardcoded to connect to ftp.microsoft.com on port 1234. That host:port rejects connections, the test module doesn't catch the rejection and the test fails every time.
iptables -A PREROUTING -t nat -p tcp -s 192.168.122.121 --dport 1234 -j DNAT --to 18.104.22.168:666
This causes a timeout and the test succeeds.
In any case, hardcoding a competitor's systems in code that has nothing to do with them is not polite. The problem is upstream.
BTW, http://grepcode.com/file/repo1.maven.org/maven2/commons-net/commons-net/3.2/org/apache/commons/net/ftp/TestConnectTimeout.java says that it should return true on UnknownHostException. The target host sends a reset; perhaps that's not an unknown exception:
192.168.122.121.54242 > 22.214.171.124.1234: Flags [S], cksum 0x7ee3 (incorrect -> 0x5cf2), seq 3087907219, win 14600, options [mss 1460,sackOK,TS val 242866817 ecr 0,nop,wscale 7], length 0
15:51:33.935228 IP (tos 0x0, ttl 243, id 43016, offset 0, flags [DF], proto TCP (6), length 40)
126.96.36.199.1234 > 192.168.122.121.54242: Flags [R.], cksum 0xc6b0 (correct), seq 0, ack 3087907220, win 8212, length 0
Best thing might be to just disable this test.
Looks like this was fixed to use www.apache.org in 3.6, which is the only version included in RHEL8.