Skip to content

Commit b34d381

Browse files
committed
increase interval for waituntil
1 parent 329aa9b commit b34d381

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

packages/amazonq/test/e2e/amazonq/testGen.test.ts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,27 @@ describe('Amazon Q Test Generation', function () {
4242
]
4343

4444
async function setupTestDocument(filePath: string, language: string) {
45-
const document = await waitUntil(async () => {
46-
const doc = await workspaceUtils.openTextDocument(filePath)
47-
return doc
48-
}, {})
45+
const document = await waitUntil(
46+
async () => {
47+
const doc = await workspaceUtils.openTextDocument(filePath)
48+
return doc
49+
},
50+
{
51+
interval: 1000,
52+
timeout: 30000,
53+
truthy: true,
54+
}
55+
)
4956

5057
if (!document) {
5158
assert.fail(`Failed to open ${language} file`)
5259
}
5360

54-
await waitUntil(async () => await vscode.window.showTextDocument(document, { preview: false }), {})
61+
await waitUntil(async () => await vscode.window.showTextDocument(document, { preview: false }), {
62+
interval: 1000,
63+
timeout: 30000,
64+
truthy: true,
65+
})
5566

5667
const activeEditor = vscode.window.activeTextEditor
5768
if (!activeEditor || activeEditor.document.uri.fsPath !== document.uri.fsPath) {

0 commit comments

Comments
 (0)