diff options
author | Leif Åstrand <legioth@gmail.com> | 2017-06-12 12:35:45 +0300 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2017-06-12 12:35:45 +0300 |
commit | f8f8cc0385acc3d205de16d3183dd1fc410524a1 (patch) | |
tree | 12208234aaea2552222eb1a8c791565071431de2 /server/src/test/java | |
parent | 8ff23ad10859132e5015f6372e623ed7ce8e05cc (diff) | |
download | vaadin-framework-f8f8cc0385acc3d205de16d3183dd1fc410524a1.tar.gz vaadin-framework-f8f8cc0385acc3d205de16d3183dd1fc410524a1.zip |
Add pluggable connector id generator support
Diffstat (limited to 'server/src/test/java')
2 files changed, 8 insertions, 11 deletions
diff --git a/server/src/test/java/com/vaadin/server/MockVaadinSession.java b/server/src/test/java/com/vaadin/server/MockVaadinSession.java index 07854560b3..0dc5010b1a 100644 --- a/server/src/test/java/com/vaadin/server/MockVaadinSession.java +++ b/server/src/test/java/com/vaadin/server/MockVaadinSession.java @@ -64,6 +64,12 @@ public class MockVaadinSession extends VaadinSession { referenceKeeper.remove(); } + @Override + public String createConnectorId(ClientConnector connector) { + // Don't delegate to service which may be null or a broken mock + return getNextConnectorId(); + } + private int closeCount; private final ReentrantLock lock = new ReentrantLock(); diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java index 2da2d6aede..f963152960 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java +++ b/server/src/test/java/com/vaadin/tests/server/component/abstractsinglecomponentcontainer/RemoveFromParentLockingTest.java @@ -15,14 +15,12 @@ */ package com.vaadin.tests.server.component.abstractsinglecomponentcontainer; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; - import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; +import com.vaadin.server.MockVaadinSession; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinSession; import com.vaadin.ui.UI; @@ -37,14 +35,7 @@ public class RemoveFromParentLockingTest { } private static VerticalLayout createTestComponent() { - VaadinSession session = new VaadinSession(null) { - private final ReentrantLock lock = new ReentrantLock(); - - @Override - public Lock getLockInstance() { - return lock; - } - }; + VaadinSession session = new MockVaadinSession(null); session.getLockInstance().lock(); try { |