You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by GitBox <gi...@apache.org> on 2020/03/06 09:13:18 UTC

[GitHub] [beam] kamilwu commented on a change in pull request #11040: [BEAM-9305] Allow value provider query strings in _CustomBigQuerySource

kamilwu commented on a change in pull request #11040: [BEAM-9305] Allow value provider query strings in _CustomBigQuerySource
URL: https://github.com/apache/beam/pull/11040#discussion_r388788211
 
 

 ##########
 File path: sdks/python/apache_beam/io/gcp/bigquery_read_it_test.py
 ##########
 @@ -156,12 +157,19 @@ def test_native_source(self):
 
   @attr('IT')
   def test_iobase_source(self):
+    query = StaticValueProvider(str, self.query)
     with beam.Pipeline(argv=self.args) as p:
       result = (
           p | 'read' >> beam.io._ReadFromBigQuery(
               query=self.query, use_standard_sql=True, project=self.project))
       assert_that(result, equal_to(self.TABLE_DATA))
 
+    with beam.Pipeline(argv=self.args) as p:
 
 Review comment:
   Do we need an integration test to cover your value provider's logic? Take a look at `TestReadFromBigQuery` test case in `bigquery_test.py`. Those are unit tests for `_ReadFromBigQuery` that actually run very fast, because pipeline is not executed.
   
   Adding new tests in `bigquery_read_it_test.py` causes huge overhead, since they are all executed by three runners (Direct, Dataflow and Flink) on every supported Python version.

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