Skip to content

Commit 5373a91

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

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ 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 () => !RecommendationService.instance.isRunning, waitOptions)
124+
119125
await invokeCompletion()
120126
originalEditorContents = vscode.window.activeTextEditor?.document.getText()
121127

0 commit comments

Comments
 (0)