Skip to content

Commit 5262dc3

Browse files
dfa1claude
andcommitted
test: tag Raincloud corpus tests @tag("raincloud"), excluded by default
A plain `./mvnw verify` silently ran the full real-world Raincloud corpus whenever a developer had hydrated it locally (via hydrate-raincloud-corpus.sh): the two Raincloud tests only gated real work behind `assumeTrue(Files.exists(manifestPath()))`, which is a no-op skip on CI (corpus never hydrated) but a surprise on a dev machine. In particular RaincloudSizeComparisonIntegrationTest — documented as purely informational — does a full Parquet->Vortex re-encode (FSST training, etc.) per slug, costing a release preflight 15+ minutes of unexpected CPU-heavy work. Make the exclusion explicit and controllable with JUnit 5 `@Tag`: - Tag both classes `@Tag("raincloud")`. - Failsafe `excludedGroups` (integration/pom.xml), bound to a new `vortex.it.excludedGroups` property defaulting to `raincloud`, so a routine build excludes them from test discovery entirely (stronger than assumeTrue's skip) yet the CLI can opt back in. Verified against a locally hydrated 10-slug corpus: - `./mvnw verify -pl integration -am` no longer discovers/runs either class. - Failsafe 3.5.6 applies `excludedGroups` even to an explicitly named `-Dit.test=Raincloud...` class, and a literal pom value cannot be cleared from the CLI — hence the property indirection. Opting in requires `-Dvortex.it.excludedGroups=` in addition to `-Dit.test`. The full conformance run (11 tests) passes end-to-end with that flag. Updated the documented invocations to include the flag: CLAUDE.md Commands section and the hydrate script's usage/output hints. No CHANGELOG entry: test/tooling-only churn, no change to shipped artifacts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent c148393 commit 5262dc3

5 files changed

Lines changed: 47 additions & 2 deletions

File tree

CLAUDE.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,17 @@ Trunk-based. PRs fine but always squash or rebase — no merge commits. Keep com
6363
./mvnw verify -pl integration -am # integration (failsafe, NOT surefire)
6464
./mvnw verify -pl integration -am -Dit.test="RustWritesJavaReadsIntegrationTest#method"
6565
./bench JavaVsJniReadBenchmark.javaReadVolume # benchmark — always ClassName.methodName filter
66-
scripts/hydrate-raincloud-corpus.sh --max-mb 200 # hydrate real-world conformance corpus (#205),
67-
# then verify -Dit.test=RaincloudConformanceIntegrationTest
66+
scripts/hydrate-raincloud-corpus.sh --max-mb 200 # hydrate real-world conformance corpus (#205), then:
67+
./mvnw verify -pl integration -am -Dvortex.it.excludedGroups= -Dit.test="RaincloudConformanceIntegrationTest"
6868
```
6969

70+
The Raincloud corpus tests (`RaincloudConformanceIntegrationTest`,
71+
`RaincloudSizeComparisonIntegrationTest`) are `@Tag("raincloud")` and excluded from a routine
72+
`./mvnw verify` (failsafe `excludedGroups`, default `raincloud`) so a plain build never runs the
73+
real corpus — even on a machine that has hydrated it locally. Opt in with
74+
`-Dvortex.it.excludedGroups=` (clears the exclusion); this is required *in addition to* `-Dit.test`,
75+
since the tag filter applies even to an explicitly named class.
76+
7077
Regenerate after editing `.fbs`/`.proto` (both generators are in-house, no external tools):
7178

7279
```bash

integration/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414

1515
<properties>
1616
<maven.deploy.skip>true</maven.deploy.skip>
17+
<!-- JUnit tags excluded from a routine `./mvnw verify`. Defaults to `raincloud` so the
18+
real-world Raincloud corpus tests never run by default — see the failsafe plugin
19+
config below. Override on the CLI to opt in, e.g. `-Dvortex.it.excludedGroups=`
20+
(empty) runs every tag; a literal pom value could not be cleared this way. -->
21+
<vortex.it.excludedGroups>raincloud</vortex.it.excludedGroups>
1722
</properties>
1823

1924
<dependencies>
@@ -203,6 +208,16 @@
203208
<includes>
204209
<include>**/*IntegrationTest.java</include>
205210
</includes>
211+
<!-- Exclude the real-world Raincloud corpus tests from a routine
212+
`./mvnw verify`: they only do real work when the corpus is hydrated
213+
locally, and the size-comparison test in particular runs a CPU-heavy
214+
Parquet->Vortex re-encode per slug that a developer would not expect
215+
from a default build. Bound to a property (not a literal) so the CLI
216+
can clear it: `-Dvortex.it.excludedGroups=` opts every raincloud test
217+
back in. This exclusion filters even an explicit `-Dit.test=Raincloud...`
218+
class selection, so running a raincloud test always requires clearing
219+
the property as well. -->
220+
<excludedGroups>${vortex.it.excludedGroups}</excludedGroups>
206221
<argLine>
207222
@{argLine}
208223
--add-opens java.base/java.nio=ALL-UNNAMED

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import io.github.dfa1.vortex.csv.CsvExporter;
1313
import io.github.dfa1.vortex.csv.ExportOptions;
1414
import org.junit.jupiter.api.DynamicTest;
15+
import org.junit.jupiter.api.Tag;
1516
import org.junit.jupiter.api.Test;
1617
import org.junit.jupiter.api.TestFactory;
1718
import org.junit.jupiter.api.parallel.Execution;
@@ -55,6 +56,13 @@
5556
/// Expected per-slug status lives in `src/test/resources/raincloud/expected-status.csv`.
5657
/// Known gaps assert that the failure still occurs, so fixing the reader forces the
5758
/// matrix entry to flip to `ok` in the same change.
59+
///
60+
/// Tagged `raincloud` and excluded from the default `./mvnw verify` (via the failsafe
61+
/// `excludedGroups` configuration) so a routine build never runs the real corpus even on
62+
/// a developer machine that has hydrated it locally. Run it explicitly with
63+
/// `-Dit.test=RaincloudConformanceIntegrationTest` (an explicit class selection overrides
64+
/// the tag exclusion) or opt every raincloud test back in with `-DexcludedGroups=`.
65+
@Tag("raincloud")
5866
class RaincloudConformanceIntegrationTest {
5967

6068
private static final Path DEFAULT_MANIFEST =

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import io.github.dfa1.vortex.parquet.ParquetImporter;
44
import org.junit.jupiter.api.DynamicTest;
5+
import org.junit.jupiter.api.Tag;
56
import org.junit.jupiter.api.Test;
67
import org.junit.jupiter.api.TestFactory;
78
import org.junit.jupiter.api.parallel.Execution;
@@ -25,6 +26,13 @@
2526
/// Skipped (visibly) when the corpus is not hydrated — run
2627
/// `scripts/hydrate-raincloud-corpus.sh` first, or point `RAINCLOUD_CORPUS_MANIFEST`
2728
/// at a manifest TSV (`slug<TAB>vortex-path<TAB>parquet-path` per line).
29+
///
30+
/// Tagged `raincloud` and excluded from the default `./mvnw verify` (via the failsafe
31+
/// `excludedGroups` configuration): this purely-informational, CPU-heavy re-encode never
32+
/// gates a routine build, even on a developer machine that has hydrated the corpus locally.
33+
/// Run it explicitly with `-Dit.test=RaincloudSizeComparisonIntegrationTest` or opt every
34+
/// raincloud test back in with `-DexcludedGroups=`.
35+
@Tag("raincloud")
2836
class RaincloudSizeComparisonIntegrationTest {
2937

3038
private static final Path DEFAULT_MANIFEST =

scripts/hydrate-raincloud-corpus.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
# Usage:
1111
# scripts/hydrate-raincloud-corpus.sh [--max-mb N] [slug ...]
1212
#
13+
# The conformance test is @Tag("raincloud") and excluded from a routine `./mvnw verify`,
14+
# so after hydrating run it explicitly with the tag exclusion cleared:
15+
# ./mvnw verify -pl integration -am -Dvortex.it.excludedGroups= \
16+
# -Dit.test=RaincloudConformanceIntegrationTest
17+
#
1318
# With no slugs, hydrates every entry of the conformance matrix
1419
# (integration/src/test/resources/raincloud/expected-status.csv) whose combined
1520
# artifact size fits --max-mb (default 200; use --max-mb 0 for no size cap — the
@@ -115,4 +120,6 @@ with open(os.environ["MANIFEST"], "w") as manifest:
115120
hydrated += 1
116121
print(f"ok {slug}")
117122
print(f"\nhydrated={hydrated} skipped={skipped} manifest={os.environ['MANIFEST']}")
123+
print("run: ./mvnw verify -pl integration -am -Dvortex.it.excludedGroups= "
124+
"-Dit.test=RaincloudConformanceIntegrationTest")
118125
PY

0 commit comments

Comments
 (0)