Skip to content

Commit 77e59ad

Browse files
dfa1claude
andcommitted
fix(tests): skip taxi-size test gracefully when CloudFront blocks the download
GitHub Actions runners get HTTP 403 from d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2024-01.parquet (CloudFront blocks/rate-limits some runner IP ranges). Locally the test passes because the file is cached at /tmp. Wrap the download in try/catch IOException and convert to an Assumption failure ("could not download taxi parquet: ...") so the test skips instead of breaking CI. Also adds the missing IOException import. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 294d0f4 commit 77e59ad

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

integration/src/test/java/io/github/dfa1/vortex/integration/ParquetImportIntegrationTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import org.junit.jupiter.api.Test;
1515
import org.junit.jupiter.api.io.TempDir;
1616

17+
import java.io.IOException;
1718
import java.net.URI;
1819
import java.nio.file.Files;
1920
import java.nio.file.Path;
@@ -164,11 +165,16 @@ void taxiParquet_importedSize_vsOriginal(@TempDir Path tmp) throws Exception {
164165
if (java.nio.file.Files.exists(cached)) {
165166
src = cached;
166167
} else {
167-
assumeNetworkAvailable();
168+
// CloudFront rate-limits / blocks some egress IPs (notably GitHub Actions
169+
// runners → 403). Skip rather than fail when the download isn't possible.
168170
src = tmp.resolve("yellow_tripdata_2024-01.parquet");
169171
try (var in = URI.create("https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2024-01.parquet")
170172
.toURL().openStream()) {
171173
java.nio.file.Files.copy(in, src);
174+
} catch (IOException e) {
175+
org.junit.jupiter.api.Assumptions.assumeTrue(false,
176+
"could not download taxi parquet: " + e.getMessage());
177+
return;
172178
}
173179
}
174180
Path vortex = tmp.resolve("taxi.vortex");

0 commit comments

Comments
 (0)