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 2019/11/09 18:17:59 UTC

[GitHub] [airflow] feluelle commented on a change in pull request #6232: [AIRFLOW-5582] AutoCommit in jdbc is missing get_autocommit

feluelle commented on a change in pull request #6232: [AIRFLOW-5582] AutoCommit in jdbc is missing get_autocommit
URL: https://github.com/apache/airflow/pull/6232#discussion_r344455725
 
 

 ##########
 File path: tests/contrib/hooks/test_jdbc_hook.py
 ##########
 @@ -49,6 +49,14 @@ def test_jdbc_conn_connection(self, jdbc_mock):
         self.assertIsInstance(jdbc_conn, Mock)
         self.assertEqual(jdbc_conn.name, jdbc_mock.return_value.name)  # pylint: disable=no-member
 
+        # Set autocommit
+        jdbc_hook.set_autocommit(jdbc_conn, False)
+        jdbc_conn.jconn.setAutoCommit.assert_called_with(False)
+
+        # Get autocommit
+        jdbc_hook.get_autocommit(jdbc_conn)
+        self.assertTrue(jdbc_conn.jconn.getAutoCommit.called)
 
 Review comment:
   Same here.

----------------------------------------------------------------
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


With regards,
Apache Git Services