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

SessionContext ITs are flaky #126

Open
mcollovati opened this issue May 16, 2023 · 3 comments · Fixed by #135
Open

SessionContext ITs are flaky #126

mcollovati opened this issue May 16, 2023 · 3 comments · Fixed by #135

Comments

@mcollovati
Copy link
Contributor

Error:  Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.889 s <<< FAILURE! - in com.vaadin.flow.quarkus.it.SessionContextIT
Error:  com.vaadin.flow.quarkus.it.SessionContextIT.httpSessionCloseDestroysSessionContext  Time elapsed: 1.157 s  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>
	at [email protected]/com.vaadin.flow.quarkus.it.SessionContextIT.assertDestroyCountEquals(SessionContextIT.java:86)
	at [email protected]/com.vaadin.flow.quarkus.it.SessionContextIT.httpSessionCloseDestroysSessionContext(SessionContextIT.java:54)
@mcollovati
Copy link
Contributor Author

Error:  Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 s <<< FAILURE! - in com.vaadin.flow.quarkus.it.SessionContextCloseIT
Error:  com.vaadin.flow.quarkus.it.SessionContextCloseIT.vaadinSessionCloseDestroysSessionContext  Time elapsed: 1.459 s  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<0>
	at [email protected]/com.vaadin.flow.quarkus.it.SessionContextCloseIT.assertDestroyCountEquals(SessionContextCloseIT.java:51)
	at [email protected]/com.vaadin.flow.quarkus.it.SessionContextCloseIT.vaadinSessionCloseDestroysSessionContext(SessionContextCloseIT.java:46)

@mcollovati mcollovati changed the title SessionContextIT.httpSessionCloseDestroysSessionContext is flaky SessionContextIT is flaky May 26, 2023
@mcollovati mcollovati changed the title SessionContextIT is flaky SessionContext ITs are flaky Jun 21, 2023
mcollovati added a commit that referenced this issue Jun 21, 2023
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
mcollovati added a commit that referenced this issue Jul 5, 2023
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
@mcollovati
Copy link
Contributor Author

Reopen because SessionContextCloseIT seems still flaky

Error:  Failures: 
Error:    SessionContextCloseIT.vaadinSessionCloseDestroysSessionContext:46->assertDestroyCountEquals:51->AbstractCdiIT.waitForCount:45->TestBenchTestCase.waitUntil:201->AbstractCdiIT.lambda$waitForCount$0:47->AbstractCdiIT.assertCountEquals:57 expected:<1> but was:<0>

@mcollovati mcollovati reopened this Jul 24, 2023
@mcollovati
Copy link
Contributor Author

Another session related flaky test ServiceIT.sessionDestroyEventObserved

Error:  com.vaadin.flow.quarkus.it.ServiceIT.sessionDestroyEventObserved  Time elapsed: 1.578 s  <<< FAILURE!
java.lang.AssertionError: expected:<0> but was:<1>
	at [email protected]/com.vaadin.flow.quarkus.it.ServiceIT.sessionDestroyEventObserved(ServiceIT.java:104)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Internal Backlog / Technical Debt
Status: Internal Backlog / Technical Debt
1 participant