TestHarness has setup(TypeSerializer outputSerializer) method, which allows to 
set serializer for primary output. Still unclear how to set side output 
serializers for MockOutput.

Alexey


________________________________
From: Alexey Trenikhun <yen...@msn.com>
Sent: Saturday, February 2, 2019 10:39 AM
To: user@flink.apache.org
Subject: Test harness for CoProcessFunction outputting Protobuf messages

Hello,
I have CoProcessFunction which outputs protobuf messages, and custom 
TypeInformation implementation to serialize protobuf messages, when I define 
graph I can set output type using 
SingleOutputStreamOperator.returns(TypeInformation<T>), for side outputs I can 
also specify TypeInformation<T> in constructor of OutputTag. However in test 
when I'm trying to use KeyedTwoInputStreamOperatorTestHarness I can't find way 
to set output type via explicit TypeInformation, furthermore if I'm trying to 
use side output, public <X> void 
AbstractStreamOperatorTestHarness::collect(OutputTag<X> outputTag, 
StreamRecord<X> record) seems ignore type information in outputTag and instead 
tries to extract type information from value using 
TypeExtractor.getForObject(record.getValue()). Is it expected behavior? Is 
another  way specify type information for test harness?

Thanks,
Alexey

Reply via email to