From: Leif Åstrand Date: Thu, 23 Apr 2015 12:57:05 +0000 (+0300) Subject: Don't leak current VaadinSession in test X-Git-Tag: 7.5.0.beta1~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c9fe8c40d3900b7fdf72d239ad02e8e81f0fa091;p=vaadin-framework.git Don't leak current VaadinSession in test Change-Id: I51d70636138ccf21ec4d7488aca2f071f940a51a --- diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java b/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java index e277d4e075..2334542676 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java @@ -102,6 +102,8 @@ public class RemoveFromParentLockingTest { "Cannot remove from parent when the session is not locked." + " Furthermore, there is another locked session, indicating that the component might be about to be moved from one session to another.", e.getMessage()); + } finally { + VaadinSession.setCurrent(null); } } @@ -119,6 +121,8 @@ public class RemoveFromParentLockingTest { notLockedComponent.addComponent(lockedComponent); } catch (AssertionError e) { // All is fine, don't care about the exact wording in this case + } finally { + VaadinSession.setCurrent(null); } }