use of com.hortonworks.registries.schemaregistry.SchemaBranch in project registry by hortonworks.
the class SchemaBranchLifeCycleTest method addIncompatibleSchemaToBranch.
@Test(expected = IncompatibleSchemaException.class)
public void addIncompatibleSchemaToBranch() throws IOException, SchemaBranchNotFoundException, InvalidSchemaException, SchemaNotFoundException, IncompatibleSchemaException, SchemaBranchAlreadyExistsException {
SchemaMetadata schemaMetadata = addSchemaMetadata(testNameRule.getMethodName(), SchemaCompatibility.BACKWARD);
SchemaIdVersion masterSchemaIdVersion = addSchemaVersion(SchemaBranch.MASTER_BRANCH, schemaMetadata, "/device.avsc");
SchemaBranch schemaBranch1 = addSchemaBranch("BRANCH1", schemaMetadata, masterSchemaIdVersion.getSchemaVersionId());
addSchemaVersion(schemaBranch1.getName(), schemaMetadata, "/device-incompat.avsc");
}
Aggregations