[Service Bus] Stress tests - Migrate to 7.0.0 (#13404)
Just updating the version and fixing related compile errors
This commit is contained in:
Родитель
de3d0734d1
Коммит
487b5444cf
|
@ -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
|
||||
) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче