test(cdk): add unit tests for SubstreamPartitionRouter null handling fix#891
Closed
darynaishchenko wants to merge 2 commits intodaryna/fix-substream-partition-routerfrom
Closed
Conversation
…#883) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: gl_anatolii.yatsuk@airbyte.io <gl_anatolii.yatsuk@airbyte.io>
…titionRouter null handling Co-Authored-By: Daryna Ishchenko <darina.ishchenko17@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
|
Closing this PR as the tests will be added directly to PR #889 as requested. |
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.
This PR targets the following PR:
Summary
This PR adds unit tests for the changes made in PR #889, which fixes
SubstreamPartitionRouterupdating cursor values when no records were read in a partition.The tests cover:
iterate_with_last_flagfunction - Parametrized test verifying the new sentinel yield behavior(None, True)for empty generators, plus existing behavior for non-empty iterablesstream_slices()returns early without errorsReview & Testing Checklist for Human
test_iterate_with_last_flag[empty_generator_yields_none_sentinel]correctly validates the new sentinel yield behavior added in PR fix(cdk): fix SubstreamPartitionRouter updating cursor value when no records were read in partition #889test_substream_partition_router_no_cursor_update_when_partition_has_no_recordsexercises the null-check logic forparent_recordpoetry run pytest unit_tests/sources/declarative/partition_routers/test_substream_partition_router.py -vNotes
daryna/fix-substream-partition-routerwhich contains the source code changes