@Test public void testSerializable() throws Exception { CoderProperties.coderSerializable(uriCoder); }
@Test public void testCoderIsSerializable() { CoderProperties.coderSerializable(GlobalWindow.Coder.INSTANCE); }
@Test public void testCoderSerializable() throws Exception { CoderProperties.coderSerializable(TEST_CODER); }
@Test public void testCoderIsSerialiable() { CoderProperties.coderSerializable(TEST_CODER); }
@Test public void testSerializable() throws Exception { CoderProperties.coderSerializable(TEST_CODER); }
@Test public <T extends Serializable> void testSerializableCoderIsSerializableWithGenericTypeToken() throws Exception { SerializableCoder<T> coder = SerializableCoder.of(new TypeDescriptor<T>() {}); CoderProperties.coderSerializable(coder); }
@Test public void testCoderIsSerializableWithWellKnownCoderType() { CoderProperties.coderSerializable( KafkaRecordCoder.of(GlobalWindow.Coder.INSTANCE, GlobalWindow.Coder.INSTANCE)); }
@Test public void testCoderIsSerializableWithWellKnownCoderType() throws Exception { CoderProperties.coderSerializable( KeyedWorkItemCoder.of( GlobalWindow.Coder.INSTANCE, GlobalWindow.Coder.INSTANCE, GlobalWindow.Coder.INSTANCE)); } }
@Test public void testCoderIsSerializableWithWellKnownCoderType() throws Exception { CoderProperties.coderSerializable(LengthPrefixCoder.of(GlobalWindow.Coder.INSTANCE)); }
@Test public void testCoderIsSerializableWithWellKnownCoderType() throws Exception { CoderProperties.coderSerializable(NullableCoder.of(GlobalWindow.Coder.INSTANCE)); }
@Test public void testCoderIsSerializableWithWellKnownCoderType() throws Exception { CoderProperties.coderSerializable(ListCoder.of(GlobalWindow.Coder.INSTANCE)); }
@Test public void testCoderIsSerializableWithWellKnownCoderType() throws Exception { CoderProperties.coderSerializable(CollectionCoder.of(GlobalWindow.Coder.INSTANCE)); }
@Test public void checkpointCoderIsSane() { setupOneMessage(ImmutableList.of()); CoderProperties.coderSerializable(primSource.getCheckpointMarkCoder()); // Since we only serialize/deserialize the 'notYetReadIds', and we don't want to make // equals on checkpoints ignore those fields, we'll test serialization and deserialization // of checkpoints in multipleReaders below. }
@Test public void saneCoder() throws Exception { OutgoingMessage message = new OutgoingMessage( DATA.getBytes(StandardCharsets.UTF_8), ImmutableMap.of(), TIMESTAMP, getRecordId(DATA)); CoderProperties.coderDecodeEncodeEqual(PubsubUnboundedSink.CODER, message); CoderProperties.coderSerializable(PubsubUnboundedSink.CODER); }
@Test public void testCoderExtensionsSerialization() throws Exception { ProtoCoder<MessageC> coder = ProtoCoder.of(MessageC.class).withExtensionsFrom(Proto2CoderTestMessages.class); CoderProperties.coderSerializable(coder); }
@Test public void testCoderProperties() throws Exception { CoderProperties.coderSerializable( KeyedWorkItemCoder.of(StringUtf8Coder.of(), VarIntCoder.of(), GlobalWindow.Coder.INSTANCE)); }
@Test public void testCoderSerializable() throws Exception { CoderProperties.coderSerializable( ValueInSingleWindow.Coder.of(StringUtf8Coder.of(), IntervalWindow.getCoder())); }
@Test public void testCoderIsSerializable() { CoderProperties.coderSerializable( UnionCoder.of(ImmutableList.of(StringUtf8Coder.of(), DoubleCoder.of()))); } }
@Test public void testSerializableCoderConstruction() throws Exception { SerializableCoder<MyRecord> coder = SerializableCoder.of(MyRecord.class); assertEquals(coder.getRecordType(), MyRecord.class); CoderProperties.coderSerializable(coder); SerializableCoder<?> decoded = SerializableUtils.clone(coder); assertThat(decoded.getRecordType(), Matchers.<Object>equalTo(MyRecord.class)); }
@Test public void testComplexCoderSerializable() { CoderProperties.coderSerializable( WindowedValue.getFullCoder( KvCoder.of(ShardedKeyCoder.of(StringUtf8Coder.of()), TableRowInfoCoder.of()), IntervalWindow.getCoder())); }