Skip to content

Commit 0ba3573

Browse files
committed
Add another test.
1 parent 8d8f294 commit 0ba3573

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

sdks/python/apache_beam/coders/coders_test_common.py

+10
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ def tearDownClass(cls):
164164
coders.SinglePrecisionFloatCoder,
165165
coders.ToBytesCoder,
166166
coders.BigIntegerCoder, # tested in DecimalCoder
167+
coders.TimestampPrefixingOpaqueWindowCoder,
167168
])
168169
cls.seen_nested -= set(
169170
[coders.ProtoCoder, coders.ProtoPlusCoder, CustomCoder])
@@ -739,6 +740,15 @@ def test_timestamp_prefixing_window_coder(self):
739740
coders.IntervalWindowCoder()), )),
740741
(window.IntervalWindow(0, 10), ))
741742

743+
def test_timestamp_prefixing_opaque_window_coder(self):
744+
sdk_coder = coders.TimestampPrefixingWindowCoder(
745+
coders.LengthPrefixCoder(coders.PickleCoder()))
746+
safe_coder = coders.TimestampPrefixingOpaqueWindowCoder()
747+
for w in [window.IntervalWindow(1, 123), window.GlobalWindow()]:
748+
round_trip = sdk_coder.decode(
749+
safe_coder.encode(safe_coder.decode(sdk_coder.encode(w))))
750+
self.assertEqual(w, round_trip)
751+
742752
def test_decimal_coder(self):
743753
test_coder = coders.DecimalCoder()
744754

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

+3
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ def test_register_finalizations(self):
314314
def test_custom_merging_window(self):
315315
raise unittest.SkipTest("https://github.com/apache/beam/issues/20641")
316316

317+
def test_custom_window_type(self):
318+
raise unittest.SkipTest("https://github.com/apache/beam/issues/20641")
319+
317320
# Inherits all other tests.
318321

319322

0 commit comments

Comments
 (0)