eladkal commented on a change in pull request #20166:
URL: https://github.com/apache/airflow/pull/20166#discussion_r765853593



##########
File path: airflow/providers/oracle/hooks/oracle.py
##########
@@ -266,3 +266,16 @@ def bulk_insert_rows(
         self.log.info('[%s] inserted %s rows', table, row_count)
         cursor.close()
         conn.close()  # type: ignore[attr-defined]
+
+    def test_connection(self):
+        """Tests the connection by executing a select 1 from dual query"""
+        status, message = False, ''
+        try:
+            if self.get_first("select 1 from dual"):
+                status = True
+                message = 'Connection successfully tested'
+        except Exception as e:
+            status = False
+            message = str(e)
+
+        return status, message        

Review comment:
       ```suggestion
           return status, message
   ```
   
   Remove white space to make static checks happy




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to