[ 
https://issues.apache.org/jira/browse/BEAM-12572?focusedWorklogId=717370&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-717370
 ]

ASF GitHub Bot logged work on BEAM-12572:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Jan/22 23:34
            Start Date: 28/Jan/22 23:34
    Worklog Time Spent: 10m 
      Work Description: benWize commented on a change in pull request #16154:
URL: https://github.com/apache/beam/pull/16154#discussion_r794954239



##########
File path: 
sdks/python/apache_beam/examples/complete/game/hourly_team_score_it_test.py
##########
@@ -90,6 +90,35 @@ def test_hourly_team_score_it(self):
         self.test_pipeline.get_full_options_as_args(**extra_opts),
         save_main_session=False)
 
+  @pytest.mark.examples_postcommit
+  def test_hourly_team_score_output_checksum_on_small_input(self):
+    # Small dataset to prevent OOM when running in local runners

Review comment:
       Comment changed

##########
File path: sdks/python/apache_beam/examples/complete/estimate_pi_test.py
##########
@@ -51,6 +54,20 @@ def test_basics(self):
       # trials.
       assert_that(result, in_between(3.125, 3.155))
 
+  @pytest.mark.examples_postcommit
+  def test_estimate_pi_output_file(self):
+    temp_folder = tempfile.mkdtemp()
+    estimate_pi.run(
+        ['--output', os.path.join(temp_folder, 'result'), '--tries', '5000'],
+        save_main_session=False)
+    # Load result file and compare.
+    with open_shards(os.path.join(temp_folder, 'result-*-of-*')) as 
result_file:
+      result = json.loads(result_file.read().strip())[2]

Review comment:
       Changed it

##########
File path: sdks/python/apache_beam/examples/complete/estimate_pi.py
##########
@@ -101,21 +101,27 @@ def expand(self, pcoll):
         | 'Sum' >> beam.CombineGlobally(combine_results).without_defaults())
 
 
-def run(argv=None):
+def run(argv=None, save_main_session=True):
 
   parser = argparse.ArgumentParser()
   parser.add_argument(
       '--output', required=True, help='Output file to write results to.')
+  parser.add_argument(

Review comment:
       Ok, changed it

##########
File path: sdks/python/apache_beam/examples/complete/autocomplete_test.py
##########
@@ -37,7 +41,11 @@ class AutocompleteTest(unittest.TestCase):
   KINGLEAR_HASH_SUM = 268011785062540
   KINGLEAR_INPUT = 'gs://dataflow-samples/shakespeare/kinglear.txt'
 
-  @pytest.mark.examples_postcommit
+  def create_file(self, path, contents):

Review comment:
       Done




-- 
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: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 717370)
    Time Spent: 33h 10m  (was: 33h)

> All beam examples should get continuously exercised on at least 2 runners
> -------------------------------------------------------------------------
>
>                 Key: BEAM-12572
>                 URL: https://issues.apache.org/jira/browse/BEAM-12572
>             Project: Beam
>          Issue Type: New Feature
>          Components: testing
>            Reporter: Valentyn Tymofieiev
>            Assignee: Benjamin Gonzalez
>            Priority: P3
>          Time Spent: 33h 10m
>  Remaining Estimate: 0h
>
> Sometimes our examples become broken without us noticing. For example, see: 
> https://lists.apache.org/thread.html/r45340bbee91a6caf798fe62d24388f645f8792cc7506351fd66adec3%40%3Cdev.beam.apache.org%3E
> We should test our examples better.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to