pingzh commented on a change in pull request #21445: URL: https://github.com/apache/airflow/pull/21445#discussion_r806304374
########## File path: tests/serialization/test_dag_serialization.py ########## @@ -1174,6 +1175,24 @@ def test_operator_deserialize_old_names(self): serialized_op = SerializedBaseOperator.deserialize_operator(blob) assert serialized_op.downstream_task_ids == {'foo'} + def test_task_resources(self): + """ + Test TaskGroup serialization/deserialization. + """ + from airflow.operators.dummy import DummyOperator + + execution_date = datetime(2020, 1, 1) + task_id = 'task1' + with DAG("test_task_resources", start_date=execution_date) as dag: + task = DummyOperator(task_id=task_id, resources={"cpus": 0.1, "ram": 2048}) + + SerializedDAG.validate_schema(SerializedDAG.to_dict(dag)) + Review comment: thanks. -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org