Skip to content

Commit 6c25735

Browse files
authored
[PubSub] Renamed lookupTopicWildcard method to fix spelling issue (#678)
Renamed `lookupTopicWildcard` method to fix spelling issue Signed-off-by: Whit Waldo <[email protected]>
1 parent 22c2d21 commit 6c25735

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/implementation/Server/GRPCServer/GRPCServerImpl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export default class GRPCServerImpl implements IAppCallbackServer {
208208
return;
209209
}
210210

211-
const [topic, route] = this.subscriptionManager.lookupTopicWilcard(pubsub, req.getTopic(), req.getPath());
211+
const [topic, route] = this.subscriptionManager.lookupTopicWildcard(pubsub, req.getTopic(), req.getPath());
212212
if (topic == "") {
213213
this.logger.warn(`Topic '${topic}' has not been subscribed to pubsub '${pubsub}', ignoring event.`);
214214
return;
@@ -267,7 +267,7 @@ export default class GRPCServerImpl implements IAppCallbackServer {
267267
return;
268268
}
269269

270-
const [topic, route] = this.subscriptionManager.lookupTopicWilcard(pubsub, req.getTopic(), req.getPath());
270+
const [topic, route] = this.subscriptionManager.lookupTopicWildcard(pubsub, req.getTopic(), req.getPath());
271271
if (topic == "") {
272272
this.logger.warn(`Topic '${topic}' has not been subscribed to pubsub '${pubsub}', ignoring bulk event.`);
273273
return;

src/pubsub/subscriptionManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ export class SubscriptionManager {
126126
}
127127

128128
/**
129-
* Lookup the topic and route for a given pubsub, topic (with wilcard support) and path.
129+
* Lookup the topic and route for a given pubsub, topic (with wildcard support) and path.
130130
* If not found, topic is empty.
131131
* @param pubsub name of the pubsub component
132132
* @param topic name of the topic
133133
* @param path path from the event
134134
* @returns the topic and route
135135
*/
136-
public lookupTopicWilcard(pubsub: string, topic: string, path: string): [string, string] {
136+
public lookupTopicWildcard(pubsub: string, topic: string, path: string): [string, string] {
137137
if (!this.isPubSubRegistered(pubsub)) {
138138
return ["", ""];
139139
}

test/unit/protocols/common/subscriptionManager.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe("subscriptionManager", () => {
1717
describe("lookupTopicWildcard", () => {
1818
it("should return an empty topic and route if the pubsub is not registered", () => {
1919
const sm = new SubscriptionManager();
20-
const res = sm.lookupTopicWilcard("pubsub", "topic", "route");
20+
const res = sm.lookupTopicWildcard("pubsub", "topic", "route");
2121

2222
expect(res[0]).toEqual("");
2323
expect(res[1]).toEqual("");
@@ -27,7 +27,7 @@ describe("subscriptionManager", () => {
2727
const sm = new SubscriptionManager();
2828
sm.registerSubscription("pubsub", "topic", {});
2929

30-
const res = sm.lookupTopicWilcard("pubsub", "topic-undefined", "route");
30+
const res = sm.lookupTopicWildcard("pubsub", "topic-undefined", "route");
3131

3232
expect(res[0]).toEqual("");
3333
expect(res[1]).toEqual("");

test/unit/protocols/grpc/GRPCServerImpl.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe("GRPCServerImpl", () => {
5858
// @ts-ignore
5959
g.subscriptionManager = {
6060
isPubSubRegistered: () => true,
61-
lookupTopicWilcard: () => ["", ""],
61+
lookupTopicWildcard: () => ["", ""],
6262
};
6363

6464
await g.onTopicEvent(
@@ -111,7 +111,7 @@ describe("GRPCServerImpl", () => {
111111
// @ts-ignore
112112
g.subscriptionManager = {
113113
isPubSubRegistered: () => true,
114-
lookupTopicWilcard: () => ["", ""],
114+
lookupTopicWildcard: () => ["", ""],
115115
};
116116

117117
await g.onBulkTopicEventAlpha1(

0 commit comments

Comments
 (0)