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 #135

Merged
merged 1 commit into from
Jul 5, 2023

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 preven ttest 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 preven
ttest flakyness.

Fixes #126
@sonarcloud
Copy link

sonarcloud bot commented Jul 5, 2023

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

@mcollovati mcollovati merged commit 4eb35f9 into master Jul 5, 2023
@mcollovati mcollovati deleted the issues/126_flaky_sessioncontext_tests branch July 5, 2023 09:13
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
2 participants