Skip to content

Commit

Permalink
fix: JOIN-31071 Update pubsub library to publish and consume avro enc…
Browse files Browse the repository at this point in the history
…oded messages
  • Loading branch information
eugene-taran committed May 4, 2023
1 parent 14e5cf9 commit 64288f7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --collect-coverage",
"test:debug": "export NODE_OPTIONS=\"$NODE_OPTIONS --inspect-brk\" && jest --forceExit",
"lint": "yarn lint:tsc && yarn lint:eslint",
"lint:eslint": "eslint . --ext .ts --max-warnings 0",
"lint:tsc": "tsc --noEmit",
Expand Down
2 changes: 1 addition & 1 deletion packages/pubsub/src/Publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class Publisher<T = unknown> {
private async getTopicType(topic: Topic) {
// const schemaName = topic.metadata?.schemaSettings?.schema
const metadata = await topic.getMetadata()
const schemaName = metadata[0].schemaSettings?.schema
const schemaName = metadata?.[0].schemaSettings?.schema
if (!schemaName) {
return undefined
}
Expand Down
1 change: 1 addition & 0 deletions packages/pubsub/src/__tests__/support/pubsubMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const getTopicMock = ({ subscriptionMock, iamMock }: ITopicMockOption = {
publishMessage: jest.fn(),
subscription: jest.fn(() => subscriptionMock),
iam: iamMock,
getMetadata: jest.fn()
})

export interface IClientMockOption {
Expand Down

0 comments on commit 64288f7

Please sign in to comment.