Skip to content

Commit 4965b7c

Browse files
HweinstockkaranA-aws
authored andcommitted
test(perf): update thresholds in buildIndex tests (aws#6228)
## Problem Performance test was reliant on dead code removed in aws#6218 ## Solution - update thresholds to accommodate the change. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent b67a4e1 commit 4965b7c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/core/src/testInteg/perf/buildIndex.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import assert from 'assert'
1010
import { LspClient, LspController } from '../../amazonq'
1111
import { LanguageClient, ServerOptions } from 'vscode-languageclient'
1212
import { createTestWorkspace } from '../../test/testUtil'
13-
import { BuildIndexRequestType, GetRepomapIndexJSONRequestType, GetUsageRequestType } from '../../amazonq/lsp/types'
13+
import { BuildIndexRequestType, GetUsageRequestType } from '../../amazonq/lsp/types'
1414
import { fs, getRandomString } from '../../shared'
1515
import { FileSystem } from '../../shared/fs/fs'
1616
import { getFsCallsUpperBound } from './utilities'
@@ -22,11 +22,10 @@ interface SetupResult {
2222
}
2323

2424
async function verifyResult(setup: SetupResult) {
25-
// A correct run makes 3 requests, but don't want to make it exact to avoid over-sensitivity to implementation. If we make 10+ something is likely wrong.
26-
assert.ok(setup.clientReqStub.callCount >= 3 && setup.clientReqStub.callCount <= 10)
25+
// A correct run makes 2 requests, but don't want to make it exact to avoid over-sensitivity to implementation. If we make 10+ something is likely wrong.
26+
assert.ok(setup.clientReqStub.callCount >= 2 && setup.clientReqStub.callCount <= 10)
2727
assert.ok(setup.clientReqStub.calledWith(BuildIndexRequestType))
2828
assert.ok(setup.clientReqStub.calledWith(GetUsageRequestType))
29-
assert.ok(setup.clientReqStub.calledWith(GetRepomapIndexJSONRequestType))
3029

3130
assert.strictEqual(getFsCallsUpperBound(setup.fsSpy), 0, 'should not make any fs calls')
3231
assert.ok(setup.findFilesSpy.callCount <= 2, 'findFiles should not be called more than twice')

0 commit comments

Comments
 (0)