Skip to content

[fix][test] Allow for CLI startup in function integration tests - #26564

Open
lhotari wants to merge 1 commit into
apache:masterfrom
lhotari:lh-fix-function-cli-test-timing
Open

[fix][test] Allow for CLI startup in function integration tests#26564
lhotari wants to merge 1 commit into
apache:masterfrom
lhotari:lh-fix-function-cli-test-timing

Conversation

@lhotari

@lhotari lhotari commented Sep 12, 2026

Copy link
Copy Markdown
Member

Motivation

Function integration tests invoke pulsar-admin in a fresh JVM for each status or state operation. On busy CI runners, startup and command completion consume a significant part of the existing deadlines. A status probe can time out even when the function has reached the expected state. The word-count tests each execute two complete create/check/delete cycles to verify state cleanup after deletion, but currently share the default five-minute timeout with shorter tests.

Modifications

  • Allow 30 seconds for function status polling, including CLI startup and command completion, instead of 15 seconds.
  • Give the Java and Python word-count lifecycle tests an explicit ten-minute timeout for their two passes.
  • Keep polling intervals, state assertions, message counts, and cleanup checks unchanged.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is covered by existing integration tests:

  • PulsarFunctionsJavaProcessTest.testJavaExclamationCustomBatchingFunction: 10/10 invocations passed with retries disabled, using a temporary invocationCount = 10 that was removed afterward.
  • Java word-count lifecycle tests passed with both BookKeeper and metadata state stores; the Python lifecycle test passed with BookKeeper. Each test retains its two create/check/delete passes. The unsupported metadata/Python combination returns early and is not counted as Python coverage.
  • ./gradlew spotlessCheck checkstyleMain checkstyleTest passed locally.

The integration runs used the current test sources with a cached test image built on September 1, 2026, rather than a newly built runtime image. They verify the exercised test paths but do not reproduce every constrained-runner timing condition.

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

Keep status and state assertions unchanged while giving CLI-heavy test paths bounded time to complete on busy runners.

Assisted-by: Codex
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.

1 participant