Commit a77ec12
authored
test(vscode): fix failure to close editors on
## 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.beforeEach hook. (#5975)1 parent 43299f3 commit a77ec12
1 file changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
493 | | - | |
| 493 | + | |
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
500 | | - | |
| 499 | + | |
| 500 | + | |
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
506 | | - | |
| 506 | + | |
507 | 507 | | |
508 | 508 | | |
509 | | - | |
| 509 | + | |
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
515 | | - | |
516 | | - | |
| 515 | + | |
| 516 | + | |
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| |||
0 commit comments