]> source.dussan.org Git - vaadin-framework.git/commitdiff
Don't leak current VaadinSession in test
authorLeif Åstrand <leif@vaadin.com>
Thu, 23 Apr 2015 12:57:05 +0000 (15:57 +0300)
committerTeppo Kurki <teppo.kurki@vaadin.com>
Wed, 13 May 2015 12:41:45 +0000 (12:41 +0000)
Change-Id: I51d70636138ccf21ec4d7488aca2f071f940a51a

server/tests/src/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java

index e277d4e075f43c06ade488ced8fb51900e7cd00b..233454267638dd41ede8462a3cdb66ec85269009 100644 (file)
@@ -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);
         }
     }