Arun sethia created BEAM-6642:
---------------------------------

             Summary: BigQueryIO test using FakeBigQueryServices
                 Key: BEAM-6642
                 URL: https://issues.apache.org/jira/browse/BEAM-6642
             Project: Beam
          Issue Type: Bug
          Components: io-java-gcp
    Affects Versions: 2.9.0
            Reporter: Arun sethia


The BigQueryIO can be tested using various FakeServices like
 * 
[FakeBigQueryServices.java|https://github.com/apache/beam/blob/master/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/FakeBigQueryServices.java]
 * 
[FakeJobService.java|https://github.com/apache/beam/blob/release-2.4.0/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/FakeJobService.java]
 * etc

when we can create FakeBigQueryServices object using FakeDatasetService and 
FakeJobService. The FakeBigQueryServices should be used with BigQueryIO using 
withTestServices in order to test in a fake/mock way.

The BigQueryIO has withTestServices annotated as  VisibleForTesting, that means 
if anybody would like to use FakeBigQueryServices they have to create test 
cases in test cases under  org.apache.beam.sdk.io.gcp.bigquery package only.

It makes sense to provide these FakeBigQueryServices and testing BigQueryIO, in 
a way that it can be used by application builder to test them from their 
application code with any package implementation. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to