use of org.apache.pulsar.client.impl.schema.AvroSchema in project pulsar by yahoo.
the class TestAvroDecoder method testCyclicDefinitionDetect.
@Test(singleThreaded = true)
public void testCyclicDefinitionDetect() {
AvroSchema cyclicSchema = AvroSchema.of(DecoderTestMessage.CyclicFoo.class);
PrestoException exception = expectThrows(PrestoException.class, () -> {
decoderFactory.extractColumnMetadata(topicName, cyclicSchema.getSchemaInfo(), PulsarColumnHandle.HandleKeyValueType.NONE);
});
assertEquals("Topic " + topicName.toString() + " schema may contains cyclic definitions.", exception.getMessage());
}
use of org.apache.pulsar.client.impl.schema.AvroSchema in project pulsar by apache.
the class TestAvroDecoder method testCyclicDefinitionDetect.
@Test(singleThreaded = true)
public void testCyclicDefinitionDetect() {
AvroSchema cyclicSchema = AvroSchema.of(DecoderTestMessage.CyclicFoo.class);
PrestoException exception = expectThrows(PrestoException.class, () -> {
decoderFactory.extractColumnMetadata(topicName, cyclicSchema.getSchemaInfo(), PulsarColumnHandle.HandleKeyValueType.NONE);
});
assertEquals("Topic " + topicName.toString() + " schema may contains cyclic definitions.", exception.getMessage());
}
use of org.apache.pulsar.client.impl.schema.AvroSchema in project incubator-pulsar by apache.
the class TestAvroDecoder method testCyclicDefinitionDetect.
@Test(singleThreaded = true)
public void testCyclicDefinitionDetect() {
AvroSchema cyclicSchema = AvroSchema.of(DecoderTestMessage.CyclicFoo.class);
PrestoException exception = expectThrows(PrestoException.class, () -> {
decoderFactory.extractColumnMetadata(topicName, cyclicSchema.getSchemaInfo(), PulsarColumnHandle.HandleKeyValueType.NONE);
});
assertEquals("Topic " + topicName.toString() + " schema may contains cyclic definitions.", exception.getMessage());
}
Aggregations