Skip to content

Conversation

@Hweinstock
Copy link
Contributor

@Hweinstock Hweinstock commented Nov 11, 2024

Problem

See issue: #5970

Solution

appears to be similar to #5955, so same solution is employed.

  • skip test if below 1.89 vscode version.
  • add helper function skipIfVscodeBelow for tests that are flaky on previous versions.

License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Hweinstock Hweinstock changed the title test(appcomposer): initMessageHandler flaky test. (WIP) test(appcomposer): initMessageHandler flaky test. Nov 11, 2024
@Hweinstock Hweinstock changed the title test(appcomposer): initMessageHandler flaky test. test(appcomposer): fix initMessageHandler flaky test. Nov 11, 2024
@Hweinstock Hweinstock marked this pull request as ready for review November 11, 2024 19:13
@Hweinstock Hweinstock requested a review from a team as a code owner November 11, 2024 19:13
Comment on lines 639 to 640
export function disableIfVscodeBelow(testContext: Mocha.Context, version: string) {
if (isMinVscode(version)) {
Copy link
Contributor

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.

Copy link
Contributor

@justinmk3 justinmk3 Nov 11, 2024

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 })

Copy link
Contributor Author

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.

@Hweinstock Hweinstock merged commit 82ee006 into aws:master Nov 12, 2024
23 of 25 checks passed
@Hweinstock Hweinstock deleted the appComposer/flakyTest branch November 12, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants