From 44b3c5248e06811c830ff23c8140646bf15a7f78 Mon Sep 17 00:00:00 2001 From: Dave Kelsey Date: Thu, 30 May 2024 14:29:40 +0100 Subject: [PATCH] Address use/reference of startingTps where not correct (#1578) Signed-off-by: Dave Kelsey --- .../caliper-core/test/worker/rate-control/fixedLoad.js | 8 ++++---- packages/caliper-core/test/worker/rate-control/maxRate.js | 8 ++++---- packages/caliper-core/test/worker/rate-control/noRate.js | 4 ++-- .../fabric_tests/phase5/benchconfig.yaml | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/caliper-core/test/worker/rate-control/fixedLoad.js b/packages/caliper-core/test/worker/rate-control/fixedLoad.js index 5d8ffa449..8c020d601 100644 --- a/packages/caliper-core/test/worker/rate-control/fixedLoad.js +++ b/packages/caliper-core/test/worker/rate-control/fixedLoad.js @@ -49,28 +49,28 @@ describe('fixedLoad controller implementation', () => { testMessage = new TestMessage('test', [], msgContent); }); - it('should set the sleep time for a single worker if a single worker is specified and the startingTps is not specified', () => { + it('should set the sleep time for a single worker if a single worker is specified and the startTps is not specified', () => { testMessage.content.rateControl.opts = {}; testMessage.content.totalWorkers = 1; controller = new FixedLoad.createRateController(testMessage, {}, 0); controller.sleepTime.should.equal(200); }); - it('should set the sleep time for a single worker if no workers are specified and the startingTps is specified', () => { + it('should set the sleep time for a single worker if no workers are specified and the startTps is specified', () => { testMessage.content.rateControl.opts = { startTps: 50 }; testMessage.content.totalWorkers = 1; controller = new FixedLoad.createRateController(testMessage, {}, 0); controller.sleepTime.should.equal(20); }); - it('should set the sleep time for a multiple workers it the startingTps is not specified', () => { + it('should set the sleep time for a multiple workers it the startTps is not specified', () => { testMessage.content.rateControl.opts = {}; testMessage.content.totalWorkers = 2; controller = new FixedLoad.createRateController(testMessage, {}, 0); controller.sleepTime.should.equal(400); }); - it('should set the sleep time for a multiple workers if the startingTps is specified', () => { + it('should set the sleep time for a multiple workers if the startTps is specified', () => { testMessage.content.rateControl.opts = { startTps: 50 }; testMessage.content.totalWorkers = 2; controller = new FixedLoad.createRateController(testMessage, {}, 0); diff --git a/packages/caliper-core/test/worker/rate-control/maxRate.js b/packages/caliper-core/test/worker/rate-control/maxRate.js index d5a65795c..f2d52a16a 100644 --- a/packages/caliper-core/test/worker/rate-control/maxRate.js +++ b/packages/caliper-core/test/worker/rate-control/maxRate.js @@ -132,7 +132,7 @@ describe('maxRate controller implementation', () => { label: 'query2', rateControl: { type: 'maximum-rate', - opts: { startingTps: 20, finishingTps: 80 } + opts: {} }, workload: { module:'./../queryByChannel.js' @@ -271,7 +271,7 @@ describe('maxRate controller implementation', () => { label: 'query2', rateControl: { type: 'maximum-rate', - opts: { startingTps: 20, finishingTps: 80 } + opts: {} }, workload: { module:'./../queryByChannel.js' @@ -319,7 +319,7 @@ describe('maxRate controller implementation', () => { label: 'query2', rateControl: { type: 'maximum-rate', - opts: { startingTps: 20, finishingTps: 80 } + opts: {} }, workload: { module:'./../queryByChannel.js' @@ -361,7 +361,7 @@ describe('maxRate controller implementation', () => { label: 'query2', rateControl: { type: 'maximum-rate', - opts: { startingTps: 20, finishingTps: 80 } + opts: {} }, workload: { module:'./../queryByChannel.js' diff --git a/packages/caliper-core/test/worker/rate-control/noRate.js b/packages/caliper-core/test/worker/rate-control/noRate.js index 95a6b1e72..932b7f93a 100644 --- a/packages/caliper-core/test/worker/rate-control/noRate.js +++ b/packages/caliper-core/test/worker/rate-control/noRate.js @@ -76,8 +76,8 @@ describe('noRate controller implementation', () => { msgContent = { label: 'query2', rateControl: { - type: 'linear-feedback-rate', - opts: { startingTps: 20, finishingTps: 80 } + type: 'dummy', + opts: { } }, workload: { module:'./../queryByChannel.js' diff --git a/packages/caliper-tests-integration/fabric_tests/phase5/benchconfig.yaml b/packages/caliper-tests-integration/fabric_tests/phase5/benchconfig.yaml index 17362faa3..691db5a01 100644 --- a/packages/caliper-tests-integration/fabric_tests/phase5/benchconfig.yaml +++ b/packages/caliper-tests-integration/fabric_tests/phase5/benchconfig.yaml @@ -19,7 +19,7 @@ test: rounds: - label: init1 txNumber: 100 - rateControl: { type: 'fixed-load', opts: { "transactionLoad": 5, "startingTps": 100 }} + rateControl: { type: 'fixed-load', opts: { "transactionLoad": 5, "startTps": 100 }} workload: module: ./../init.js arguments: