potiuk opened a new issue #11837: URL: https://github.com/apache/airflow/issues/11837
TestTaskInstance tests fail in scheduled/master build - likely due to some dependency that gets upgraded to latest version in scheduled run: Example: https://github.com/apache/airflow/runs/1303692175?check_suite_focus=true#step:6:521 ____________________ TestTaskInstance.test_mark_success_url ____________________ self = <tests.models.test_taskinstance.TestTaskInstance testMethod=test_mark_success_url> def test_mark_success_url(self): now = pendulum.now('Europe/Brussels') dag = DAG('dag', start_date=DEFAULT_DATE) task = DummyOperator(task_id='op', dag=dag) ti = TI(task=task, execution_date=now) query = urllib.parse.parse_qs( urllib.parse.urlparse(ti.mark_success_url).query, keep_blank_values=True, strict_parsing=True) self.assertEqual(query['dag_id'][0], 'dag') self.assertEqual(query['task_id'][0], 'op') > self.assertEqual(pendulum.parse(query['execution_date'][0]), now) E AssertionError: DateTime(2020, 10, 25, 2, 45, 31, 174951, tzinfo=Timezone('+01:00')) != DateTime(2020, 10, 25, 2, 45, 31, 174951, tzinfo=Timezone('Europe/Brussels')) tests/models/test_taskinstance.py:1153: AssertionError ____________________ test_timestamp_behaviour_with_timezone ____________________ clear_db_fixture = <generator object clear_db at 0x7f5e0c4035d0> def test_timestamp_behaviour_with_timezone(clear_db_fixture): for session in clear_db_fixture: execdate = timezone.utcnow() with freeze_time(execdate): current_time = timezone.utcnow() old_log = add_log(execdate, session, timezone_override=pendulum.timezone('Europe/Warsaw')) session.expunge(old_log) # No matter what timezone we set - we should always get back UTC log_time = session.query(Log).one().dttm > assert log_time == current_time E AssertionError: assert datetime.datetime(2020, 10, 25, 0, 45, 41, 387944, tzinfo=Timezone('UTC')) == FakeDatetime(2020, 10, 25, 1, 45, 41, 387944, tzinfo=Timezone('UTC')) tests/models/test_timestamp.py:75: AssertionError ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
