diff --git a/integration/src/test/java/io/github/dfa1/vortex/integration/PcoFixtureInspectionIntegrationTest.java b/integration/src/test/java/io/github/dfa1/vortex/integration/PcoFixtureInspectionIntegrationTest.java index d085081e..7eee4e21 100644 --- a/integration/src/test/java/io/github/dfa1/vortex/integration/PcoFixtureInspectionIntegrationTest.java +++ b/integration/src/test/java/io/github/dfa1/vortex/integration/PcoFixtureInspectionIntegrationTest.java @@ -12,6 +12,7 @@ import org.junit.jupiter.api.io.TempDir; import java.lang.foreign.MemorySegment; +import java.net.HttpURLConnection; import java.net.URI; import java.nio.ByteBuffer; import java.nio.ByteOrder; @@ -314,7 +315,13 @@ private static Path downloadIfMissing(Path tmp, String name) throws Exception { return cached; } Path dest = tmp.resolve(name); - try (var in = URI.create(BASE + name).toURL().openStream()) { + var conn = (HttpURLConnection) URI.create(BASE + name).toURL().openConnection(); + int code = conn.getResponseCode(); + // S3 occasionally returns a transient 5xx; that is infrastructure noise, not + // an interop regression, so skip rather than redden the build. A 4xx (e.g. the + // fixture was removed/renamed) is a genuine signal and still fails. + assumeTrue(code < 500, () -> "transient S3 error " + code + " for " + name); + try (var in = conn.getInputStream()) { Files.copy(in, dest, StandardCopyOption.REPLACE_EXISTING); } return dest; diff --git a/integration/src/test/java/io/github/dfa1/vortex/integration/RustWritesJavaReadsIntegrationTest.java b/integration/src/test/java/io/github/dfa1/vortex/integration/RustWritesJavaReadsIntegrationTest.java index 41ff2591..a7a86d3b 100644 --- a/integration/src/test/java/io/github/dfa1/vortex/integration/RustWritesJavaReadsIntegrationTest.java +++ b/integration/src/test/java/io/github/dfa1/vortex/integration/RustWritesJavaReadsIntegrationTest.java @@ -38,6 +38,7 @@ import java.io.IOException; import java.lang.foreign.Arena; import java.lang.foreign.ValueLayout; +import java.net.HttpURLConnection; import java.net.URI; import java.nio.ByteOrder; import java.nio.file.Files; @@ -228,7 +229,13 @@ private static Path downloadIfMissing(Path tmp, String name) throws Exception { return cached; } Path dest = tmp.resolve(name); - try (var in = URI.create(S3_BASE + name).toURL().openStream()) { + var conn = (HttpURLConnection) URI.create(S3_BASE + name).toURL().openConnection(); + int code = conn.getResponseCode(); + // S3 occasionally returns a transient 5xx; that is infrastructure noise, not + // an interop regression, so skip rather than redden the build. A 4xx (e.g. the + // fixture was removed/renamed) is a genuine signal and still fails. + assumeTrue(code < 500, () -> "transient S3 error " + code + " for " + name); + try (var in = conn.getInputStream()) { Files.copy(in, dest, StandardCopyOption.REPLACE_EXISTING); } return dest;