fix(pulsar): increase wait strategy deadlines to fix random test time…#3600
fix(pulsar): increase wait strategy deadlines to fix random test time…#3600ljluestc wants to merge 1 commit intotestcontainers:mainfrom
Conversation
…outs The Pulsar module used WithWaitStrategy which has a default 60s deadline. Pulsar is a heavy Java application that can take longer than 60s to start, especially in CI environments, causing random context deadline exceeded failures. Changes: - Use WithWaitStrategyAndDeadline(2min) for default Run() - Use WithWaitStrategyAndDeadline(3min) for WithFunctionsWorker() - Use WithWaitStrategyAndDeadline(2min) for WithTransactions() - Add explicit WithStartupTimeout(2min) to HTTP wait strategies Fixes testcontainers#2886 Co-Authored-By: Oz <oz-agent@warp.dev>
❌ Deploy Preview for testcontainers-go failed.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can generate walkthrough in a markdown collapsible section to save space.Enable the |
The Pulsar module used WithWaitStrategy which has a default 60s deadline. Pulsar is a heavy Java application that can take longer than 60s to start, especially in CI environments, causing random context deadline exceeded failures.
Changes:
Fixes #2886
What does this PR do?
Replaces
WithWaitStrategy(which uses a hardcoded 60s deadline) withWithWaitStrategyAndDeadlineusing longer timeouts throughout the Pulsar module:Run(): 2 minute deadlineWithFunctionsWorker(): 3 minute deadline (functions worker adds extra startup time)WithTransactions(): 2 minute deadlineAlso adds explicit
WithStartupTimeout(2*time.Minute)to the HTTP wait strategies for the admin API and transaction topic endpoint checks.Why is it important?
Pulsar is a heavy Java application whose startup time can exceed 60 seconds, especially in resource-constrained CI environments. The default 60s deadline causes flaky
context deadline exceededfailures, making the test suite unreliable. Increasing timeouts to 2-3 minutes gives Pulsar sufficient time to fully initialize.Related issues