[Service Bus] Stress tests - Migrate to 7.0.0 (#13404)

Just updating the version and fixing  related compile errors
This commit is contained in:
Harsha Nalluru 2021-01-26 12:52:02 -08:00 коммит произвёл GitHub
Родитель de3d0734d1
Коммит 487b5444cf
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -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"
},

Просмотреть файл

@ -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";
@ -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;

Просмотреть файл

@ -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;
@ -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
) {