Skip to content

test(node-integration): Raise kafkajs test timeout to 90s#21055

Merged
mydea merged 1 commit into
developfrom
fix/kafkajs-integration-test-timeout
May 20, 2026
Merged

test(node-integration): Raise kafkajs test timeout to 90s#21055
mydea merged 1 commit into
developfrom
fix/kafkajs-integration-test-timeout

Conversation

@mydea
Copy link
Copy Markdown
Member

@mydea mydea commented May 20, 2026

Summary

  • Bumps the per-test Vitest timeout in suites/tracing/kafkajs/test.ts from 60_000 to 90_000, matching the existing postgres / postgresjs heavier-weight docker-compose tests.

Root cause

Failing run:

FAIL suites/tracing/kafkajs/test.ts > kafkajs > esm/cjs > esm > traces producers and consumers
Error: Test timed out in 60000ms.

The Vitest { timeout: 60_000 } covers everything: docker-compose up + kafka broker healthcheck + scenario (connect admin, connect producer, create topic, connect consumer, subscribe, 4 s wait, produce, consume, both spans flushed). The compose healthcheck alone can take up to ~75 s on a busy runner (15 s start_period + 30 retries × 2 s interval), leaving the actual scenario little to no headroom.

Raising to 90_000 adds 50% of margin while staying within the precedent set by sibling heavy-broker tests (postgres, postgresjs line 419/508 both use { timeout: 90_000 }).

Fixes #20840

🤖 Generated with Claude Code

The test wraps a full docker-compose-up + kafka broker readiness +
producer/consumer scenario under a single 60s Vitest timeout. The
docker-compose healthcheck alone can take up to ~75s before the broker
reports ready (15s start_period + retries), leaving very little
headroom for the scenario itself on a busy CI runner — and producing a
flaky "Test timed out in 60000ms" failure.

Bump the per-test timeout from 60_000 to 90_000, matching the existing
postgres / postgresjs heavier-weight docker-compose tests.

Fixes #20840

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mydea mydea requested a review from a team as a code owner May 20, 2026 09:12
mydea added a commit that referenced this pull request May 20, 2026
Dogfooding produced PRs (#21055, #21053) with literal backslash-backticks
in their bodies because the body got passed through `gh pr create
--body "$(cat <<'EOF' ... EOF)"`, where I needlessly escaped backticks
out of shell-quoting paranoia, breaking every code block.

Tell the agent to write the body to a file with the `Write` tool, then
pass `--body-file` to `gh pr create`. The body never touches Bash
quoting, so backticks, dollar signs, and parens render exactly as
written.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@JPeer264 JPeer264 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if raising the timeout is the best here. 1 minute is already quite some time, but yeah, it already handles quite some stuff. Let's see if it gets better

@mydea mydea merged commit 0d1ec9b into develop May 20, 2026
49 checks passed
@mydea mydea deleted the fix/kafkajs-integration-test-timeout branch May 20, 2026 09:33
mydea added a commit that referenced this pull request May 20, 2026
Dogfooding produced PRs (#21055, #21053) with literal backslash-backticks
in their bodies because the body got passed through `gh pr create
--body "$(cat <<'EOF' ... EOF)"`, where I needlessly escaped backticks
out of shell-quoting paranoia, breaking every code block.

Tell the agent to write the body to a file with the `Write` tool, then
pass `--body-file` to `gh pr create`. The body never touches Bash
quoting, so backticks, dollar signs, and parens render exactly as
written.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

[Flaky CI]: Node (26) Integration Tests - suites/tracing/kafkajs/test.ts > kafkajs > esm/cjs > esm > traces producers and consumers

2 participants