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

test: retry count assertion on session invalidation #134

Closed
wants to merge 1 commit into from

Conversation

mcollovati
Copy link
Contributor

Description

Session context tests check the counter value hold by a session bean right after invalidating the Vaadin session. Since the counter is incremented in the PreDestroy hook, it may happen that when the test checks for the counter value, the callback has not yet been invoked.
This change retries the counter check for at most on second, to prevent test flakyness.

Fixes #126

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

Session context tests check the counter value hold by a session bean right after
invalidating the Vaadin session. Since the counter is incremented in the
PreDestroy hook, it may happen that when the test checks for the counter value,
the callback has not yet been invoked.
This change retries the counter check for at most on second, to prevent test
flakyness.

Fixes #126
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@mshabarov mshabarov self-requested a review June 26, 2023 11:23
@mcollovati mcollovati changed the title test: retry count assertion on session invalidation test: retry count assertion on session invalidation Jul 5, 2023
@mcollovati mcollovati changed the title test: retry count assertion on session invalidation test: retry count assertion on session invalidation Jul 5, 2023
@mcollovati
Copy link
Contributor Author

Closing because the force-push has not been detected by the PR.
I'll try to see if reopen updates the PR; otherwise I'll create a new one

@mcollovati mcollovati closed this Jul 5, 2023
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.

SessionContext ITs are flaky
1 participant