-
Notifications
You must be signed in to change notification settings - Fork 734
test(appcomposer): fix initMessageHandler flaky test. #5973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
packages/core/src/test/applicationcomposer/messageHandlers/generateResourceHandler.test.ts
Outdated
Show resolved
Hide resolved
packages/core/src/test/testUtil.ts
Outdated
| export function disableIfVscodeBelow(testContext: Mocha.Context, version: string) { | ||
| if (isMinVscode(version)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't really correct. isMinVscode checks if the current vscode is the min version.
The version arg is only relevant for when we bump the min version. It's unrelated to the check itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isMinVscode might be less confusing if we change its argument to be dict-like:
if (isMinVscode({ throwIfMinGte = version })
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I was assuming this cutoff version could only be below the stable/insider versions, which isn't correct. I went ahead and avoided using isMinVscode altogether so that this function can be used more generally.
Problem
See issue: #5970
Solution
appears to be similar to #5955, so same solution is employed.
skipIfVscodeBelowfor tests that are flaky on previous versions.License: I confirm that my contribution is made under the terms of the Apache 2.0 license.