Skip to content

Comments

test: Resolve flaky webhook integration test#640

Merged
vdusek merged 2 commits intomasterfrom
fix/flaky-webhook-test
Feb 24, 2026
Merged

test: Resolve flaky webhook integration test#640
vdusek merged 2 commits intomasterfrom
fix/flaky-webhook-test

Conversation

@vdusek
Copy link
Contributor

@vdusek vdusek commented Feb 24, 2026

Summary

  • The _get_finished_run_id helper in webhook tests asserted that at least one SUCCEEDED run of apify/hello-world already exists, but this is not guaranteed (runs can be cleaned up between test runs)
  • Instead of failing with an assertion error, the helper now falls back to starting a new hello-world actor run via .call() (which waits for completion) when no completed runs are found
  • Fixes the flaky test_webhook_test[async] failure seen in CI: https://github.com/apify/apify-client-python/actions/runs/22345359592/job/64658461897?pr=639

Test plan

  • Pre-commit hooks pass (lint, type check, docstrings)
  • Integration tests pass in CI without the flaky failure

🤖 Generated with Claude Code

The `_get_finished_run_id` helper asserted that completed runs of hello-world
actor exist, but this is not guaranteed (runs can be cleaned up). Instead of
failing, fall back to starting a new run via `.call()` and waiting for it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Feb 24, 2026
@vdusek vdusek self-assigned this Feb 24, 2026
@vdusek vdusek requested a review from Pijukatel February 24, 2026 09:59
@github-actions github-actions bot added this to the 135th sprint - Tooling team milestone Feb 24, 2026
@github-actions github-actions bot added the tested Temporary label used only programatically for some analytics. label Feb 24, 2026
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.62%. Comparing base (7895a4e) to head (9791a2c).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #640       +/-   ##
===========================================
+ Coverage   75.60%   96.62%   +21.02%     
===========================================
  Files          45       45               
  Lines        4271     4271               
===========================================
+ Hits         3229     4127      +898     
+ Misses       1042      144      -898     
Flag Coverage Δ
integration 94.63% <ø> (?)
unit 75.60% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek changed the title fix: Resolve flaky webhook integration test test: Resolve flaky webhook integration test Feb 24, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vdusek vdusek merged commit a293601 into master Feb 24, 2026
26 checks passed
@vdusek vdusek deleted the fix/flaky-webhook-test branch February 24, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants