Skip to content

Commit 1e91a85

Browse files
committed
Add allow_unsafe_triggers flag to the newly added tests.
1 parent 560537b commit 1e91a85

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

sdks/python/apache_beam/runners/portability/prism_runner_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from apache_beam.options.pipeline_options import DebugOptions
3737
from apache_beam.options.pipeline_options import PortableOptions
3838
from apache_beam.options.pipeline_options import StandardOptions
39+
from apache_beam.options.pipeline_options import TypeOptions
3940
from apache_beam.runners.portability import portable_runner_test
4041
from apache_beam.runners.portability import prism_runner
4142
from apache_beam.testing.util import assert_that
@@ -68,6 +69,7 @@ def __init__(self, *args, **kwargs):
6869
self.environment_config = None
6970
self.enable_commit = False
7071
self.streaming = False
72+
self.allow_unsafe_triggers = False
7173

7274
def setUp(self):
7375
self.enable_commit = False
@@ -180,6 +182,8 @@ def create_options(self):
180182
PortableOptions).environment_options = self.environment_options
181183

182184
options.view_as(StandardOptions).streaming = self.streaming
185+
options.view_as(
186+
TypeOptions).allow_unsafe_triggers = self.allow_unsafe_triggers
183187
return options
184188

185189
# Can't read host files from within docker, read a "local" file there.
@@ -234,6 +238,7 @@ def construct_timestamped(k, t):
234238
return window.TimestampedValue((k, t), t)
235239

236240
def test_after_count_trigger_batch(self):
241+
self.allow_unsafe_triggers = True
237242
with self.create_pipeline() as p:
238243
result = (
239244
p
@@ -257,6 +262,7 @@ def test_after_count_trigger_batch(self):
257262
# yapf: enable
258263

259264
def test_after_count_trigger_streaming(self):
265+
self.allow_unsafe_triggers = True
260266
self.streaming = True
261267
with self.create_pipeline() as p:
262268
result = (

0 commit comments

Comments
 (0)