diff options
author | Artur Signell <artur@vaadin.com> | 2013-03-22 17:45:26 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-04-02 10:40:33 +0300 |
commit | d4fcfdf7aa21899e8a621d48b8c1bb75fbd46c62 (patch) | |
tree | f39c4373b6977ad7322ce44dcc323f7f54e5534d /uitest/src/com/vaadin/tests/applicationcontext | |
parent | 7dcccb01754a42338ec056cfda642bd8c28bb4d7 (diff) | |
download | vaadin-framework-d4fcfdf7aa21899e8a621d48b8c1bb75fbd46c62.tar.gz vaadin-framework-d4fcfdf7aa21899e8a621d48b8c1bb75fbd46c62.zip |
Ensure session is locked during cleanup (#10569)
* At the same time ensures request timer handling is done while session is locked (#10108)
Change-Id: Ifc36e1ac66d02e25fe98616319c014137bd94c10
Diffstat (limited to 'uitest/src/com/vaadin/tests/applicationcontext')
-rw-r--r-- | uitest/src/com/vaadin/tests/applicationcontext/CloseSession.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/uitest/src/com/vaadin/tests/applicationcontext/CloseSession.java b/uitest/src/com/vaadin/tests/applicationcontext/CloseSession.java index 446638f8a2..cca76cc9e3 100644 --- a/uitest/src/com/vaadin/tests/applicationcontext/CloseSession.java +++ b/uitest/src/com/vaadin/tests/applicationcontext/CloseSession.java @@ -18,13 +18,16 @@ package com.vaadin.tests.applicationcontext; import javax.servlet.http.HttpSession; +import com.vaadin.server.Page; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinService; +import com.vaadin.server.VaadinSession; import com.vaadin.server.WrappedHttpSession; import com.vaadin.tests.components.AbstractTestUI; import com.vaadin.tests.util.Log; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.UI; public class CloseSession extends AbstractTestUI { private static final String OLD_HASH_PARAM = "oldHash"; @@ -158,6 +161,17 @@ public class CloseSession extends AbstractTestUI { @Override public void detach() { super.detach(); - System.out.println("UI " + getUIId() + " detached"); + log.log("Detach of " + this + " (" + getUIId() + ")"); + boolean correctUI = (UI.getCurrent() == this); + boolean correctPage = (Page.getCurrent() == getPage()); + boolean correctVaadinSession = (VaadinSession.getCurrent() == getSession()); + boolean correctVaadinService = (VaadinService.getCurrent() == getSession() + .getService()); + log.log("UI.current correct in detach: " + correctUI); + log.log("Page.current correct in detach: " + correctPage); + log.log("VaadinSession.current correct in detach: " + + correctVaadinSession); + log.log("VaadinService.current correct in detach: " + + correctVaadinService); } } |