@@ -84,11 +84,19 @@ def make_dag_runs(dag_maker, session, time_machine):
8484 run_id = "run_3" ,
8585 state = DagRunState .RUNNING ,
8686 run_type = DagRunType .SCHEDULED ,
87- logical_date = pendulum . DateTime ( 2023 , 2 , 3 , 0 , 0 , 0 , tzinfo = pendulum . UTC ),
88- start_date = pendulum . DateTime ( 2023 , 2 , 3 , 0 , 0 , 0 , tzinfo = pendulum . UTC ),
87+ logical_date = date + timedelta ( days = 2 ),
88+ start_date = date + timedelta ( days = 2 ),
8989 )
90+
9091 run3 .end_date = None
9192
93+ dag_maker .create_dagrun (
94+ run_id = "run_4" ,
95+ state = DagRunState .QUEUED ,
96+ run_type = DagRunType .SCHEDULED ,
97+ logical_date = date + timedelta (days = 3 ),
98+ )
99+
92100 for ti in run1 .task_instances :
93101 ti .state = TaskInstanceState .SUCCESS
94102
@@ -208,12 +216,12 @@ class TestHistoricalMetricsDataEndpoint:
208216 (
209217 {"start_date" : "2023-01-01T00:00" , "end_date" : "2023-08-02T00:00" },
210218 {
211- "dag_run_states" : {"failed" : 1 , "queued" : 0 , "running" : 1 , "success" : 1 },
212- "dag_run_types" : {"backfill" : 0 , "asset_triggered" : 1 , "manual" : 0 , "scheduled" : 2 },
219+ "dag_run_states" : {"failed" : 1 , "queued" : 1 , "running" : 1 , "success" : 1 },
220+ "dag_run_types" : {"backfill" : 0 , "asset_triggered" : 1 , "manual" : 0 , "scheduled" : 3 },
213221 "task_instance_states" : {
214222 "deferred" : 0 ,
215223 "failed" : 2 ,
216- "no_status" : 2 ,
224+ "no_status" : 4 ,
217225 "queued" : 0 ,
218226 "removed" : 0 ,
219227 "restarting" : 0 ,
@@ -252,12 +260,12 @@ class TestHistoricalMetricsDataEndpoint:
252260 (
253261 {"start_date" : "2023-02-02T00:00" },
254262 {
255- "dag_run_states" : {"failed" : 1 , "queued" : 0 , "running" : 1 , "success" : 0 },
256- "dag_run_types" : {"backfill" : 0 , "asset_triggered" : 1 , "manual" : 0 , "scheduled" : 1 },
263+ "dag_run_states" : {"failed" : 1 , "queued" : 1 , "running" : 1 , "success" : 0 },
264+ "dag_run_types" : {"backfill" : 0 , "asset_triggered" : 1 , "manual" : 0 , "scheduled" : 2 },
257265 "task_instance_states" : {
258266 "deferred" : 0 ,
259267 "failed" : 2 ,
260- "no_status" : 2 ,
268+ "no_status" : 4 ,
261269 "queued" : 0 ,
262270 "removed" : 0 ,
263271 "restarting" : 0 ,
0 commit comments