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
fix(tests): closeAllEditors() sometimes fails #3676
Problem:
- closeAllEditors() sometimes fails (example below).
- Its failure message has a race with the waitUntil() callback.
2 failing
1) FileViewerManager
"after each" hook for "opens a new editor if no document exists":
Error: The following editors were still open after closeAllEditors():
extension-output-amazonwebservices.aws-toolkit-vscode-#17-test channel
/us-west-2/bucket-name/test1.txt
at /Users/runner/work/aws-toolkit-vscode/aws-toolkit-vscode/src/test/testUtil.ts:276:15
at Generator.next (<anonymous>)
at fulfilled (dist/src/test/testUtil.js:9:58)
2) "before each" hook: beforeEach for "Test AslVisualizationManager managedVisualizations set does not add duplicate renders when multiple Vis active":
Error: The following editors were still open after closeAllEditors():
extension-output-amazonwebservices.aws-toolkit-vscode-#1-AWS Toolkit Logs
at Object.<anonymous> (src/test/testUtil.ts:276:15)
at Generator.next (<anonymous>)
at fulfilled (dist/src/test/testUtil.js:9:58)
Solution:
- Increase the waitUntil() timeout.
- Store the editor list from waitUntil() and use that in the failure message.
- Delete redundant, unused closeAllEditors() from src/shared/utilities/vsCodeUtils.ts.
0 commit comments