Skip to content

-DskipTests alone does not skip the unit suite, so CI steps and runtime legs run all of it #237

Description

@saurabhjain1592

What happens

pom.xml binds surefire's skipTests to the project's own property: <skipTests>${skipUnitTests}</skipTests> (line 232), with skipUnitTests defaulting to false (line 101). A plugin configuration value overrides a command-line user property, so -DskipTests on its own does not skip the unit suite, and Maven runs all of it.

Measured on one test class, on main at 060b9c683:

  • mvn -DskipTests -Dtest=V11ProvenanceTest test ran it: Tests run: 10.
  • Adding -DskipUnitTests=true printed Tests are skipped.

Where it bites (counted on main at 060b9c683)

Workflow steps that pass -DskipTests alone, and so run the whole unit suite:

  • .github/workflows/ci.yml:318: the package job's mvn package -DskipTests.
  • .github/workflows/heartbeat-real-stack.yml:66: mvn -B -DskipTests package.
  • .github/workflows/integration.yml:103: mvn install -DskipTests.
  • .github/workflows/release.yml:155: mvn clean deploy -Prelease -DskipTests. Whether a release should run the suite is its own call, but the flag does not do what it reads as doing.

ci.yml:159 (the examples job) already passes -DskipUnitTests=true.

Runtime-e2e:

  • 2 executable script(s) build this way: runtime-e2e/read_path_identity/run.sh, runtime-e2e/sandbox_telemetry_stream_tag/test.sh.
  • 13 leg source file(s) tell the reader to build with -DskipTests alone in their usage comments.
  • 15 README file(s) under runtime-e2e/ do the same.

The cost is time and noise, not a wrong result: the suite passes, it just runs where nobody asked for it. A local production-posture run of #236's leg spent minutes, and wrote a 52 MB log, on the unit suite before the leg itself ran. #236 fixed its own run.sh.

Fix

Either:

  1. pass -DskipUnitTests=true everywhere the intent is to skip unit tests; or
  2. make the binding honour both properties, so that -DskipTests works as Maven users expect and mvn verify -DskipUnitTests=true keeps running only failsafe.

The second fixes every site above at once.

Target: v11.1.0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions