Skip to content

Commit

Permalink
[Service Bus] Stress tests - Migrate to 7.0.0 (#13404)
Browse files Browse the repository at this point in the history
Just updating the version and fixing  related compile errors
  • Loading branch information
HarshaNalluru committed Jan 26, 2021
1 parent de3d073 commit 487b544
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit 487b544

Please sign in to comment.