use of org.apache.pulsar.common.schema.SchemaData in project incubator-pulsar by apache.
the class SchemaServiceTest method getByVersionReturnsTheCorrectEntry2.
@Test
public void getByVersionReturnsTheCorrectEntry2() throws Exception {
putSchema(schemaId1, schema1, version(0));
putSchema(schemaId1, schema2, version(1));
SchemaData version1 = getSchema(schemaId1, version(1));
assertEquals(schema2, version1);
}
use of org.apache.pulsar.common.schema.SchemaData in project incubator-pulsar by apache.
the class SchemaServiceTest method writeSchemasToDifferentIds.
@Test
public void writeSchemasToDifferentIds() throws Exception {
SchemaData schemaWithDifferentId = schema3;
putSchema(schemaId1, schema1, version(0));
String schemaId2 = "id2";
putSchema(schemaId2, schemaWithDifferentId, version(0));
SchemaData withFirstId = getLatestSchema(schemaId1, version(0));
SchemaData withDifferentId = getLatestSchema(schemaId2, version(0));
assertEquals(schema1, withFirstId);
assertEquals(schema3, withDifferentId);
}
Aggregations