Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix quickPickUserOrderedValues windows test timing out #4879

Merged
merged 3 commits into from
Oct 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions extension/src/test/suite/vscode/quickPick.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ suite('Quick Pick Test Suite', () => {
const result = await resultPromise

expect(result).to.deep.equal([5, 2, 1])
})
}).timeout(8000)

it('should return undefined if user cancels the quick pick', async () => {
const quickPick = disposable.track(
Expand Down Expand Up @@ -200,11 +200,7 @@ suite('Quick Pick Test Suite', () => {
{ label: 'B', value: 2 },
{ label: 'C', value: 3 },
{ label: 'D', value: 4 },
{ label: 'E', value: 5 },
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the test, I don't think there is a bug inside the test but there are a lot of commands being run in selectMultipleQuickPickItems due to needing to repeatedly loop over the items. Possibly why the test keeps hitting a timeout 🤔

I've decreased the number of quick pick items and added 2000ms to the timeout.

{ label: 'F', value: 6 },
{ label: 'G', value: 7 },
{ label: 'H', value: 8 },
{ label: 'I', value: 9 }
{ label: 'E', value: 5 }
]

void quickPickUserOrderedValues(
Expand All @@ -223,6 +219,6 @@ suite('Quick Pick Test Suite', () => {
quickPick.items,
'all items which could be selected are hidden'
).to.have.lengthOf(maxSelectedItems)
})
}).timeout(8000)
})
})