You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(vscode): fix failure to close editors on beforeEach hook. (#5975)
## Problem
- See #5325
- the following `waitUntil` is timing out:
https://github.com/aws/aws-toolkit-vscode/blob/43299f368308b6720ba22bbd910c6714bc47bdcb/packages/core/src/test/testUtil.ts#L495-L518
- All occurrences of error (AFAIK) fail to list any editors open. This
implies `waitUntil` is timing out even though all editors (that aren't
ignored by pattern) are closed.
## Solution
A potential explanation is that the `executeCommand` is taking a long
time to close the editors ignored by the patterns, and causing a timeout
in `waitUntil`. In this case, we don't want to error.
- refactor to also check if activeEditors is cleared. If there aren't
any, we shouldn't be throwing an error.
- Also, decrease timeout to avoid wasting time here during tests (if we
can't close ignored editors, don't waste time trying). This code is run
between every test so 5 second timeout per test is huge.
---
<!--- REMINDER: Ensure that your PR meets the guidelines in
CONTRIBUTING.md -->
License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
0 commit comments