Abacn commented on code in PR #30546:
URL: https://github.com/apache/beam/pull/30546#discussion_r1515232397


##########
sdks/python/apache_beam/io/gcp/bigquery_tools_test.py:
##########
@@ -224,9 +224,15 @@ def test_delete_dataset_retries_for_timeouts(self, 
patched_time_sleep):
     self.assertTrue(client.datasets.Delete.called)
 
   @mock.patch('time.sleep', return_value=None)
+  @mock.patch(
+      'apitools.base.py.base_api._SkipGetCredentials', return_value=True)
   @mock.patch('google.cloud._http.JSONConnection.http')
-  def test_user_agent_insert_all(self, http_mock, patched_sleep):
-    wrapper = beam.io.gcp.bigquery_tools.BigQueryWrapper()
+  def test_user_agent_insert_all(
+      self, http_mock, patched_skip_get_credentials, patched_sleep):
+    try:

Review Comment:
   This does not sounds a valid workaround. It's like error happens in a line 
and then we skip the test. If it is "it needs network access to get 
credential.", then we should skip the test when there isn't network access in 
the decorator, and not inside the test



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