dabla commented on code in PR #62922:
URL: https://github.com/apache/airflow/pull/62922#discussion_r4092316978
##########
airflow-core/tests/unit/models/test_mappedoperator.py:
##########
@@ -1828,3 +1828,88 @@ def test_mapped_operator_retry_delay_explicit(dag_maker):
# Should return the explicitly set value
assert mapped_deser.retry_delay == custom_retry_delay
+
+
[email protected](
+ ("batch_size", "items"),
+ [
+ pytest.param(5, [1, 2, 3], id="batch_size-larger-than-items"),
+ pytest.param(2, [1, 2, 3], id="batch_size-smaller-than-items"),
+ pytest.param(3, [1, 2, 3], id="batch_size-equal-to-items"),
+ pytest.param(2, 5, id="scalar-input-is-never-measured"),
+ ],
+)
+def test_batched_ti_count_is_batch_size_regardless_of_items(dag_maker,
session, batch_size, items):
+ from airflow.serialization.definitions.mappedoperator import
get_mapped_ti_count
+
+ with dag_maker(dag_id=f"test_batch_size_{batch_size}", session=session,
serialized=True) as dag:
+
MockOperator.partial(task_id="task").batch(size=batch_size).iterate(arg1=items)
Review Comment:
Yes, voting has been started on the devlist:
https://lists.apache.org/thread/x5bd26zfqkkhp7sx7nb0crjlsctf2z5j
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]