Skip to content

Testing and Javadoc

TheMeinerLP edited this page Aug 1, 2026 · 3 revisions

Test and Javadoc conventions applied to every subproject except falco-bom (which has no sources to test or document — see Build Setup).

Javadoc: -Werror on doclint

tasks.withType<Javadoc>().configureEach {
    (options as StandardJavadocDocletOptions).addBooleanOption("Werror", true)
}

The project's convention asks for a Javadoc comment on every type and member. That convention is only as good as its enforcement: without -Werror, a missing comment produces a doclint warning that shows up once in a CI log and is then never read again. Turning warnings into build failures is what actually makes the "Javadoc on everything" rule hold in practice rather than in intent only.

falco-demo is a special case worth noting: the root build applies -Werror to every Javadoc task, but only the three published library modules ever run one automatically, because build only reaches the javadoc task through withJavadocJar(), which falco-demo does not apply (it is never published — see Benchmarks and Demo). Left alone, the "Javadoc on every class and method" convention would hold for three modules and quietly not for a fourth. falco-demo/build.gradle.kts restores it explicitly:

tasks.named("check") {
    dependsOn(tasks.named("javadoc"))
}

Test heap size

tasks.withType<Test>().configureEach {
    useJUnitPlatform()
    maxHeapSize = "1g"
    jvmArgs("-Dminestom.inside-test=true")
    ...
}

The chunk loader tests allocate payloads of roughly one mebibyte each to cover the external chunk file path. Without an explicit heap size, the test JVM can die from memory pressure while other build tasks run in parallel alongside it — and that failure mode surfaces misleadingly, as an EOFException rather than an out-of-memory error or a clean test failure. Setting maxHeapSize = "1g" explicitly removes that flakiness.

Coverage

Every subproject that runs tests also finalizes them with a JaCoCo report:

tasks.withType<Test>().configureEach {
    ...
    finalizedBy(tasks.named("jacocoTestReport"))
}

tasks.withType<JacocoReport>().configureEach {
    dependsOn(tasks.withType<Test>())
    reports {
        xml.required.set(true)
        csv.required.set(true)
    }
}

Falco


Start here

The measured record

Why it is built this way

  • Rationale — the index for the five rationale pages
  • Research — the index for the five investigations
  • Research: Fluent API — the investigation behind the builders; a record, not a reference

Working on the build

Clone this wiki locally