summaryrefslogtreecommitdiffstats
path: root/server/tests
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-09-09 22:16:51 +0300
committerLeif Åstrand <leif@vaadin.com>2012-09-09 22:16:51 +0300
commit998c9c97b4b7d9531028b442df4c38a33b60e5f0 (patch)
tree9c81571efd63c3ebcf4fce03411486ac23e65041 /server/tests
parent98a934554a8a88e0b64e9bc4069ee2af82286efa (diff)
downloadvaadin-framework-998c9c97b4b7d9531028b442df4c38a33b60e5f0.tar.gz
vaadin-framework-998c9c97b4b7d9531028b442df4c38a33b60e5f0.zip
Verify that lock is held when accessing state (#9515)
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java1
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java5
3 files changed, 6 insertions, 2 deletions
diff --git a/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java b/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java
index b64514ea14..bc5846acf0 100644
--- a/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java
+++ b/server/tests/src/com/vaadin/tests/data/converter/ConverterFactory.java
@@ -69,6 +69,7 @@ public class ConverterFactory extends TestCase {
final VaadinSession appWithCustomIntegerConverter = new VaadinSession();
appWithCustomIntegerConverter
.setConverterFactory(new ConverterFactory42());
+ appWithCustomIntegerConverter.getLock().lock();
TextField tf = new TextField("", "123") {
@Override
@@ -97,6 +98,7 @@ public class ConverterFactory extends TestCase {
public void testApplicationConverterFactoryForDifferentThanCurrentApplication() {
final VaadinSession fieldAppWithCustomIntegerConverter = new VaadinSession();
+ fieldAppWithCustomIntegerConverter.getLock().lock();
fieldAppWithCustomIntegerConverter
.setConverterFactory(new ConverterFactory42());
VaadinSession.setCurrent(new VaadinSession());
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java
index b48ad62bcc..031e0c80bd 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbstractFieldValueConversions.java
@@ -187,6 +187,7 @@ public class AbstractFieldValueConversions extends TestCase {
public void testNumberDoubleConverterChange() {
final VaadinSession a = new VaadinSession();
+ a.getLock().lock();
VaadinSession.setCurrent(a);
TextField tf = new TextField() {
@Override
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java
index c9f579a887..f259e156ff 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java
@@ -19,10 +19,11 @@ public class RemoveListenersOnDetach {
AbstractField field = new AbstractField() {
final private VaadinSession application = new VaadinSession() {
-
+ {
+ getLock().lock();
+ }
};
private UI uI = new UI() {
-
@Override
protected void init(WrappedRequest request) {