test: poll for dataset items in crawlee e2e tests - #1086
Merged
Conversation
vdusek
marked this pull request as ready for review
August 11, 2026 07:39
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1086 +/- ##
==========================================
- Coverage 92.24% 92.18% -0.07%
==========================================
Files 51 51
Lines 3249 3249
==========================================
- Hits 2997 2995 -2
- Misses 252 254 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Pijukatel
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_playwright_crawlerfailed on master (run 31375518173) withAssertionError: Missing product: Widget A/assert 'Widget A' in {}, while the run itself succeeded andassert items.count == 3passed on the line above.The dataset read in
verify_crawler_resultshappens immediately after the run finishes. The API returned an empty item list while its pagination headers already reported the final item count, andDatasetItemsPage.countismax(x-apify-pagination-count, len(items))- so the count assertion passed on the headers alone and the test only broke once it looked at the items.The read now polls with
poll_until_condition(30s ceiling) until all pushed items are returned, and asserts onlen(items.items)instead of the header-derivedcount, which was the misleading part. The helper is shared by all six crawler e2e tests.Verified by replaying the exact response shape from CI (empty
items,count=3): the old helper reproducesMissing product: Widget A, the new one passes after polling, an immediately consistent read still takes a single call, and wrong or extra items still fail fast.tests/e2e/test_crawleeagainst the platform:test_playwright_crawler,test_adaptive_playwright_crawler,test_http_crawlerandtest_basic_crawlerpass;test_parsel_crawlerandtest_beautifulsoup_crawlercould not run on my account (Actor-count limit), they fail before reaching this helper.✍️ Drafted by Claude Code