[
https://issues.apache.org/jira/browse/BEAM-8575?focusedWorklogId=361040&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-361040
]
ASF GitHub Bot logged work on BEAM-8575:
----------------------------------------
Author: ASF GitHub Bot
Created on: 17/Dec/19 18:33
Start Date: 17/Dec/19 18:33
Worklog Time Spent: 10m
Work Description: bumblebee-coming commented on pull request #10159:
[BEAM-8575] Added a unit test to CombineTest class to test that Combiā¦
URL: https://github.com/apache/beam/pull/10159#discussion_r358958274
##########
File path: sdks/python/apache_beam/transforms/combiners_test.py
##########
@@ -31,24 +31,43 @@
import apache_beam as beam
import apache_beam.transforms.combiners as combine
from apache_beam.options.pipeline_options import PipelineOptions
+from apache_beam.options.pipeline_options import StandardOptions
from apache_beam.testing.test_pipeline import TestPipeline
from apache_beam.testing.test_stream import TestStream
from apache_beam.testing.util import assert_that
from apache_beam.testing.util import equal_to
from apache_beam.testing.util import equal_to_per_window
+from apache_beam.transforms import trigger
from apache_beam.transforms import window
from apache_beam.transforms.core import CombineGlobally
from apache_beam.transforms.core import Create
from apache_beam.transforms.core import Map
from apache_beam.transforms.display import DisplayData
from apache_beam.transforms.display_test import DisplayDataItemMatcher
from apache_beam.transforms.ptransform import PTransform
+from apache_beam.transforms.trigger import AfterAll
+from apache_beam.transforms.trigger import AfterCount
+from apache_beam.transforms.trigger import AfterWatermark
+from apache_beam.transforms.window import GlobalWindows
from apache_beam.transforms.window import TimestampCombiner
from apache_beam.typehints import TypeCheckError
from apache_beam.utils.timestamp import Timestamp
class CombineTest(unittest.TestCase):
+ def setUp(self):
+ # Use state on the TestCase class, since other references would be pickled
+ # into a closure and not have the desired side effects.
+ CombineTest.all_records = []
Review comment:
When you said "state", did you mean a class attribute or the StateSpec of
Beam?
I tried other ways to record firing panes, but after synced with the newest
version of apache_beam, it turns out the result is no longer the last firing,
but a list of all firings. Therefore there is no need to record anything. I
also tried the DISCARDING mode, its result also correctly represented the
firings ([1, 2, 3, 4, 5, 0, 0]).
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 361040)
Time Spent: 36h 50m (was: 36h 40m)
> Add more Python validates runner tests
> --------------------------------------
>
> Key: BEAM-8575
> URL: https://issues.apache.org/jira/browse/BEAM-8575
> Project: Beam
> Issue Type: Test
> Components: sdk-py-core, testing
> Reporter: wendy liu
> Assignee: wendy liu
> Priority: Major
> Time Spent: 36h 50m
> Remaining Estimate: 0h
>
> This is the umbrella issue to track the work of adding more Python tests to
> improve test coverage.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)