-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CDO-157 Added loop to get all resources using streaming #351
Conversation
spark_pipeline_framework/transformers/fhir_receiver/v2/fhir_receiver_processor.py
Show resolved
Hide resolved
retrigger checks |
results = [result async for result in async_gen] | ||
assert len(results) == 2 | ||
assert results[0]["resources"][0] == '{"resourceType": "Patient", "id": "1"}' | ||
assert results[0]["errors"] == [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no assertion for index 1 which was happening before.
@@ -194,7 +197,7 @@ async def test_get_batch_result_streaming_async_multiple_results() -> None: | |||
results.append(result) | |||
|
|||
# Assert the results | |||
assert len(results) == 1 | |||
assert len(results) == 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only comparing 1 item
@@ -645,7 +646,7 @@ async def get_batch_results_paging_async( | |||
server_page_number += 1 | |||
resources = resources + result_response | |||
page_number += 1 | |||
if limit and 0 < limit <= len(resources): | |||
if limit and 0 < limit < len(resources): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBD
No description provided.