Skip to content

Commit

Permalink
[BEAM-4594] Skip test_pardo_state_only for Flink PVR.
Browse files Browse the repository at this point in the history
  • Loading branch information
tweise committed Sep 22, 2018
1 parent 35e105d commit 1316e5f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ def cross_product(elem, sides):
equal_to([('a', 'a'), ('a', 'b'), ('b', 'a'), ('b', 'b')]))

def test_pardo_state_only(self):
p = self.create_pipeline()
if not isinstance(p.runner, fn_api_runner.FnApiRunner):
# test is inherited by Flink PVR, which does not support the feature yet
self.skipTest('User state not supported.')

index_state_spec = userstate.CombiningValueStateSpec(
'index', beam.coders.VarIntCoder(), sum)
Expand All @@ -248,7 +252,7 @@ def process(self, kv, index=beam.DoFn.StateParam(index_state_spec)):
('B', 'b', 2),
('B', 'b', 3)]

with self.create_pipeline() as p:
with p:
assert_that(p | beam.Create(inputs) | beam.ParDo(AddIndex()),
equal_to(expected))

Expand Down

0 comments on commit 1316e5f

Please sign in to comment.