You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/03/22 13:42:34 UTC

[GitHub] [airflow] aneesh-joseph commented on a change in pull request #9973: Improve compatibility with mssql

aneesh-joseph commented on a change in pull request #9973:
URL: https://github.com/apache/airflow/pull/9973#discussion_r598725144



##########
File path: tests/models/test_renderedtifields.py
##########
@@ -172,7 +172,10 @@ def test_delete_old_records(self, rtif_num, num_to_keep, remaining_rtifs, expect
         assert rtif_num == len(result)
 
         # Verify old records are deleted and only 'num_to_keep' records are kept
-        with assert_queries_count(expected_query_count):
+        expected_query_count_based_on_db = (expected_query_count + 1, expected_query_count)[
+            session.bind.dialect.name in ["postgresql", "sqlite", "mysql"] or expected_query_count == 0
+        ]

Review comment:
       we fire an extra query here https://github.com/apache/airflow/blob/4e362c134702dca30d1bd2e3da38bc2ee39825bf/airflow/models/renderedtifields.py#L169




-- 
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:
users@infra.apache.org