Skip to content

Commit

Permalink
[Schema Registry Avro] Fix test (Azure#21660)
Browse files Browse the repository at this point in the history
  • Loading branch information
deyaaeldeen authored Apr 28, 2022
1 parent e99e8cc commit 67946c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { MessageContent } from "../../src/";
import chaiPromises from "chai-as-promised";
import { createTestRegistry } from "./utils/mockedRegistryClient";
import { isLive } from "./utils/isLive";
import { v4 as uuid } from "uuid";

chaiUse(chaiPromises);

Expand Down Expand Up @@ -145,9 +146,9 @@ describe("AvroSerializer", function () {
await assert.isRejected(
serializer.deserialize({
data,
contentType: "avro/binary+000",
contentType: `avro/binary+${uuid()}`,
}),
`Schema does not exist`
/Schema id .* does not exist/
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function createMockedTestRegistry(): SchemaRegistry {
async function getSchema(id: string, _options?: GetSchemaOptions): Promise<Schema> {
const storedSchema = mapById.get(id);
if (!storedSchema) {
throw new Error(`Schema does not exist: ${JSON.stringify(id)}`);
throw new Error(`Schema id ${id} does not exist`);
}
return storedSchema;
}
Expand Down

0 comments on commit 67946c5

Please sign in to comment.