Skip to content

Commit

Permalink
[Service Bus] Remove message count check - flaky rule filter test (Az…
Browse files Browse the repository at this point in the history
…ure#13131)

Azure#13105 investigates the flakyness.

The reason why the message count in the test can sometimes(5/1000 times) be zero is that the sent messages might not have been filtered into the subscription by the time we call the runtime properties method.

If we call the receiveMessages directly, the inherent delay would help in receiving the messages and should be enough for the test.
  • Loading branch information
HarshaNalluru authored Jan 8, 2021
1 parent 8b5463b commit b76efbb
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions sdk/servicebus/service-bus/test/atomRuleFilters.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,6 @@ describe("Filter messages with the rules set by the ATOM API", () => {

await serviceBusClient.createSender(topicName).sendMessages(messagesToSend);

// Making sure the subscription has the expected number of messages
should.equal(
(
await serviceBusAtomManagementClient.getSubscriptionRuntimeProperties(
topicName,
subscriptionName
)
).totalMessageCount,
numberOfMessagesToBeFiltered,
"Unexpected number of messages filtered"
);

const receivedMessages = await serviceBusClient
.createReceiver(topicName, subscriptionName)
.receiveMessages(5);
Expand Down

0 comments on commit b76efbb

Please sign in to comment.