> Please review this test-only PR which introduces testing of the unspecified > but long-standing fallback to FTP for non-local files in the 'file' URL > scheme. > > This in preparation for the upcoming proposal to disable the feature by > default in JDK-8353440. > > Since we cannot reliably bind an FTP server to port 21, the test instead uses > an HTTP proxy, binding to an ephemeral port. This menas we don't test > non-proxy code paths. We still test that the FTP fallback is used, which is > the key point here. (We aim to test file URL connections, not FTP URL > connection internals) > > An alternative here could be to just verify that the returned URLConnection > is an instance of FtpURLConnection. However, I opted for an end-to-end test > here, since the amount of extra code seems reasonable. > > By temporarly moving this test to tier1, I was able to confirm this test runs > green also on Windows GHA.
Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision: Do not assume that the loopback address is IPv4 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24418/files - new: https://git.openjdk.org/jdk/pull/24418/files/f235d79f..18b449de Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24418&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24418&range=00-01 Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/24418.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24418/head:pull/24418 PR: https://git.openjdk.org/jdk/pull/24418