Skip to content
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

fix flaky behaviour [ Test load tab state] #4454

Merged
merged 3 commits into from May 15, 2024

Conversation

vchikoti1998
Copy link
Contributor

Types of changes

  • [ x] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

The test is failing because the loadState is being called out of runInEdt. When runInEdt is added, thread safety is enforced and the test passes.

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

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

@vchikoti1998 vchikoti1998 requested a review from a team as a code owner May 9, 2024 05:27
AwsToolkitExplorerToolWindow.DEVTOOLS_TAB_ID
}
)
assertThat(sut.state.selectedTab).isEqualTo(AwsToolkitExplorerToolWindow.Q_TAB_ID)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this test change now that user can dismiss the Q tab?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this we are just testing whether Q_TAB is selected or not. Actually this test passes but sometimes fails on CI and local. So, running this test in runInEdtAndGet {} block. To avoid flakiness.

Should this test change now that user can dismiss the Q tab?

I think this is an another test case, isn't it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per discussion with Ankit, leave default to be Q_TAB

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default tab selected should be Q_TAB, checked with @ankit-sharma90

@vchikoti1998
Copy link
Contributor Author

/retryBuilds

Copy link

sonarcloud bot commented May 15, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@vchikoti1998 vchikoti1998 merged commit f2df380 into main May 15, 2024
13 of 14 checks passed
@vchikoti1998 vchikoti1998 deleted the vchikoti/fix_flaky_load_tab_state_test branch May 15, 2024 22:52
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.

None yet

3 participants