Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Service Bus] Fix test failure in the canary region #11588

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions sdk/servicebus/service-bus/test/sendBatch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
getRandomTestClientTypeWithSessions,
getRandomTestClientTypeWithNoSessions
} from "./utils/testutils2";
import { ServiceBusSender } from "../src/sender";
import { ServiceBusSender, ServiceBusSenderImpl } from "../src/sender";
import { ConditionErrorNameMapper } from "@azure/core-amqp";

describe("Send Batch", () => {
Expand Down Expand Up @@ -411,9 +411,10 @@ describe("Send Batch", () => {
try {
await sender.createBatch({ maxSizeInBytes });
} catch (error) {
const maxSize = await (sender as ServiceBusSenderImpl)["_sender"].getMaxMessageSize();
should.equal(
error.message,
`Max message size (${maxSizeInBytes} bytes) is greater than maximum message size (262144 bytes) on the AMQP sender link.`,
`Max message size (${maxSizeInBytes} bytes) is greater than maximum message size (${maxSize} bytes) on the AMQP sender link.`,
"Unexpected error message when tried to create a batch of size > maximum message size."
);
errorIsThrown = true;
Expand Down