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] Stress tests - Migrate to 7.0.0 #13404

Merged
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions sdk/servicebus/service-bus/test/stress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "ts-node scenarioBatchReceive.ts --testDurationInMs=10000 --recieveMode=receiveAndDelete"
"test": "ts-node scenarioBatchReceive.ts --testDurationInMs=10000 --receiveMode=receiveAndDelete"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@azure/service-bus": "^7.0.0-preview.8",
"@azure/service-bus": "^7.0.0",
"minimist": "^1.2.5",
"uuid": "^8.3.0"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReceiveMode, ServiceBusClient, ServiceBusReceiver } from "@azure/service-bus";
import { ServiceBusClient, ServiceBusReceiver } from "@azure/service-bus";
import { SBStressTestsBase } from "./stressTestsBase";
import { delay } from "rhea-promise";
import parsedArgs from "minimist";
Expand All @@ -9,7 +9,7 @@ dotenv.config();

// Define connection string and related Service Bus entity names here
const connectionString = process.env.SERVICEBUS_CONNECTION_STRING || "<connection string>";

type ReceiveMode = "receiveAndDelete" | "peekLock";
interface ScenarioReceiveBatchOptions {
testDurationInMs?: number;
receiveMode?: ReceiveMode;
Expand Down
4 changes: 2 additions & 2 deletions sdk/servicebus/service-bus/test/stress/stressTestsBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export class SBStressTestsBase {
public async receiveStreaming(
receiver: ServiceBusReceiver,
duration: number,
options: Pick<SubscribeOptions, "autoComplete" | "maxConcurrentCalls"> & {
options: Pick<SubscribeOptions, "autoCompleteMessages" | "maxConcurrentCalls"> & {
manualLockRenewal: boolean;
completeMessageAfterDuration: boolean;
maxAutoRenewLockDurationInMs: number;
Expand All @@ -185,7 +185,7 @@ export class SBStressTestsBase {
if (options.settleMessageOnReceive) {
await this.completeMessage(message, receiver);
} else if (
!options.autoComplete &&
!options.autoCompleteMessages &&
options.maxAutoRenewLockDurationInMs === 0 &&
options.manualLockRenewal
) {
Expand Down