use of io.divolte.server.SchemaRegistry in project divolte-collector by divolte.
the class SchemaRegistryTest method testSchemaForUnknownSinkThrowsException.
@Test(expected = IllegalArgumentException.class)
public void testSchemaForUnknownSinkThrowsException() {
final ValidatedConfiguration vc = new ValidatedConfiguration(() -> ConfigFactory.parseResources("reference.conf"));
final SchemaRegistry registry = new SchemaRegistry(vc);
// This throws an exception if the sink is unknown.
registry.getSchemaBySinkName("an-unknown-sink");
}
use of io.divolte.server.SchemaRegistry in project divolte-collector by divolte.
the class SchemaRegistryTest method testConfluentSinkCorrectlyAssociatedWithSchemaId.
@Test
public void testConfluentSinkCorrectlyAssociatedWithSchemaId() {
final ValidatedConfiguration vc = new ValidatedConfiguration(() -> ConfigFactory.parseResources("schema-registry-with-confluent.conf"));
final SchemaRegistry registry = new SchemaRegistry(vc);
final DivolteSchema schema = registry.getSchemaBySinkName("kafka");
assertEquals(schema.confluentId, Optional.of(12345));
}
use of io.divolte.server.SchemaRegistry in project divolte-collector by divolte.
the class SchemaRegistryTest method testSinkCorrectlyAssociatedWithSchema.
@Test
public void testSinkCorrectlyAssociatedWithSchema() {
final ValidatedConfiguration vc = new ValidatedConfiguration(() -> ConfigFactory.parseResources("schema-registry-with-confluent.conf"));
final SchemaRegistry registry = new SchemaRegistry(vc);
// This throws an exception if the sink is unknown.
registry.getSchemaBySinkName("kafka");
}
use of io.divolte.server.SchemaRegistry in project divolte-collector by divolte.
the class SchemaRegistryTest method testSchemaForUnknownMappingThrowsException.
@Test(expected = IllegalArgumentException.class)
public void testSchemaForUnknownMappingThrowsException() {
final ValidatedConfiguration vc = new ValidatedConfiguration(() -> ConfigFactory.parseResources("reference.conf"));
final SchemaRegistry registry = new SchemaRegistry(vc);
// This throws an exception if the mapping is unknown.
registry.getSchemaByMappingName("an-unknown-mapping");
}
Aggregations