Skip to content

[improve][build] Disable test retry when running tests in IntelliJ#25814

Merged
nodece merged 1 commit into
apache:masterfrom
lhotari:lh-disable-test-retry-in-intellij
May 19, 2026
Merged

[improve][build] Disable test retry when running tests in IntelliJ#25814
nodece merged 1 commit into
apache:masterfrom
lhotari:lh-disable-test-retry-in-intellij

Conversation

@lhotari
Copy link
Copy Markdown
Member

@lhotari lhotari commented May 19, 2026

Motivation

When running tests in IntelliJ, the current Gradle configuration re-runs failed tests via the testRetryCount system property (default 1). This is undesirable when running tests manually in the IDE: a developer triggering a single test expects to see its actual failure, not a retried run that obscures the original error or flakiness.

IntelliJ delegates test execution to Gradle, and it can be detected at build configuration time via the idea.active system property that IntelliJ sets when invoking Gradle.

Modifications

  • build-logic/conventions/src/main/kotlin/pulsar.java-conventions.gradle.kts: when idea.active=true, default testRetryCount to 0 instead of 1. An explicit -PtestRetryCount=... Gradle property still takes precedence.
  • tests/integration/build.gradle.kts: same change applied to the integrationTest task.

CLI / CI behavior is unchanged because idea.active is not set there.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

@lhotari lhotari added this to the 5.0.0-M1 milestone May 19, 2026
@nodece nodece merged commit 768df20 into apache:master May 19, 2026
80 of 82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants