diff options
author | Artur Signell <artur@vaadin.com> | 2015-02-05 11:22:01 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-02-05 09:51:59 +0000 |
commit | 0ad0caae93085a5ad6e1146f445583fbb9aeec4e (patch) | |
tree | 6bc3730e0f76fc71081687cae0af52aed5380bed /server/tests/src/com/vaadin | |
parent | ac658de97f04dd16c1b06e00505a93b54e632e0b (diff) | |
download | vaadin-framework-0ad0caae93085a5ad6e1146f445583fbb9aeec4e.tar.gz vaadin-framework-0ad0caae93085a5ad6e1146f445583fbb9aeec4e.zip |
Prevent AlwaysLockedVaadinSession from being GCed during test
Change-Id: Id6e2e6c7e013e8c667f658d5877c5db7d072106b
Diffstat (limited to 'server/tests/src/com/vaadin')
-rw-r--r-- | server/tests/src/com/vaadin/tests/util/AlwaysLockedVaadinSession.java | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/server/tests/src/com/vaadin/tests/util/AlwaysLockedVaadinSession.java b/server/tests/src/com/vaadin/tests/util/AlwaysLockedVaadinSession.java index 9b0b524b6a..89d3449b12 100644 --- a/server/tests/src/com/vaadin/tests/util/AlwaysLockedVaadinSession.java +++ b/server/tests/src/com/vaadin/tests/util/AlwaysLockedVaadinSession.java @@ -1,23 +1,13 @@ package com.vaadin.tests.util; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; - +import com.vaadin.server.MockVaadinSession; import com.vaadin.server.VaadinService; -import com.vaadin.server.VaadinSession; - -public class AlwaysLockedVaadinSession extends VaadinSession { - private ReentrantLock lock; +public class AlwaysLockedVaadinSession extends MockVaadinSession { public AlwaysLockedVaadinSession(VaadinService service) { super(service); - lock = new ReentrantLock(); - lock.lock(); + lock(); } - @Override - public Lock getLockInstance() { - return lock; - } } |