This document describes tests that are excluded from the normal ./gradlew test run because they require network access and take significant time (10–30 minutes).
File: mollib/src/test/java/com/bammellab/mollib/data/MmCifDownloadParseAllTest.kt
What it does:
- Collects every PDB ID from
mollib/src/main/java/com/bammellab/mollib/data/PDBs.kt - Deduplicates them (~500–600 unique IDs from ~1 700 list entries)
- Downloads each one from RCSB as
https://files.rcsb.org/download/<ID>.cif.gz - Decompresses with
GZIPInputStreamand parses withParserMmCifFile - Reports a per-run summary: pass / fail / HTTP 404 counts
- Fails the test if any structure parses with 0 atoms or throws an exception (404s are warnings only)
How to run:
./gradlew.bat :mollib:testLongRunningOutput appears in the Gradle console and in the HTML report:
mollib/build/reports/tests/testLongRunning/index.html
Skipping behavior:
- If the network is unreachable the test prints a skip message and exits cleanly (no failure).
- HTTP 404 responses are logged but do not count as failures — some legacy PDB entries have been removed from RCSB.
Why it is excluded from the default test run:
The test is tagged @Tag("long-running"). The default :mollib:test Gradle task is configured to excludeTags("long-running") in mollib/build.gradle.kts.
# Fast: unit tests only (default)
./gradlew.bat :mollib:test
# Slow: long-running network tests only
./gradlew.bat :mollib:testLongRunning