tvalentyn commented on a change in pull request #16154: URL: https://github.com/apache/beam/pull/16154#discussion_r794163006
########## File path: sdks/python/apache_beam/examples/cookbook/bigquery_side_input_it_test.py ########## @@ -0,0 +1,69 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +"""Integration test for the BigQuery side input example.""" + +# pytype: skip-file + +import logging +import unittest +import uuid + +import pytest +from hamcrest.core.core.allof import all_of + +from apache_beam.examples.cookbook import bigquery_side_input +from apache_beam.runners.runner import PipelineState +from apache_beam.testing.pipeline_verifiers import PipelineStateMatcher +from apache_beam.testing.test_pipeline import TestPipeline +from apache_beam.testing.test_utils import delete_files + + +class BigQuerySideInputIT(unittest.TestCase): + DEFAULT_OUTPUT_FILE = \ + 'gs://temp-storage-for-end-to-end-tests/py-it-cloud/output' + + def setUp(self): + self.test_pipeline = TestPipeline(is_integration_test=True) + self.uuid = str(uuid.uuid4()) + + self.output = '/'.join([self.DEFAULT_OUTPUT_FILE, self.uuid, 'results']) + + @pytest.mark.examples_postcommit + def test_basics(self): + state_verifier = PipelineStateMatcher(PipelineState.DONE) + NUM_GROUPS = 3 + + extra_opts = { + 'output': self.output + '/side-input', + 'num_groups': str(NUM_GROUPS), + 'on_success_matcher': all_of(state_verifier) Review comment: Thanks, I didn't realize it was the case. -- 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]
