Skip to content

Commit 1d060f7

Browse files
committed
test(amazonq): ensure the recommendation is not initially started before invoking completion
1 parent ba97d35 commit 1d060f7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/amazonq/test/e2e/inline/inline.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,17 @@ describe('Amazon Q Inline', async function () {
116116
**/
117117
await sleep(1000)
118118

119+
/**
120+
* It seems like there are instances (race condition?) where amazon q starts generating when you open up
121+
* the file. Wait for that initial request to settle before doing anything
122+
*/
123+
await waitUntil(async () => {
124+
console.log(
125+
`Waiting for recommenation to service to settle. Current status: ${RecommendationService.instance.isRunning}`
126+
)
127+
return !RecommendationService.instance.isRunning
128+
}, waitOptions)
129+
119130
await invokeCompletion()
120131
originalEditorContents = vscode.window.activeTextEditor?.document.getText()
121132

0 commit comments

Comments
 (0)