summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/push/PushFromInit.java
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2016-04-15 11:06:18 +0300
committerTeemu Suo-Anttila <teemusa@vaadin.com>2016-04-15 14:00:58 +0300
commit6b8412033e680ce6e5c7827ac504adf132305726 (patch)
tree0df05d16c324b285610af8910c126b58f4c490c5 /uitest/src/com/vaadin/tests/push/PushFromInit.java
parent9192b0bb5e5e699b506b3d3e7df4cf295fbea44a (diff)
downloadvaadin-framework-6b8412033e680ce6e5c7827ac504adf132305726.tar.gz
vaadin-framework-6b8412033e680ce6e5c7827ac504adf132305726.zip
Build uitest war with maven
Change-Id: I32625901ca27a282253df44c6e776cf9632bacda
Diffstat (limited to 'uitest/src/com/vaadin/tests/push/PushFromInit.java')
-rw-r--r--uitest/src/com/vaadin/tests/push/PushFromInit.java82
1 files changed, 0 insertions, 82 deletions
diff --git a/uitest/src/com/vaadin/tests/push/PushFromInit.java b/uitest/src/com/vaadin/tests/push/PushFromInit.java
deleted file mode 100644
index 63af3d9ec7..0000000000
--- a/uitest/src/com/vaadin/tests/push/PushFromInit.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 2000-2014 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.push;
-
-import com.vaadin.annotations.Push;
-import com.vaadin.server.VaadinRequest;
-import com.vaadin.tests.components.AbstractTestUIWithLog;
-import com.vaadin.ui.Button;
-
-@Push
-public class PushFromInit extends AbstractTestUIWithLog {
-
- public static final String LOG_DURING_INIT = "Logged from access run before init ends";
- public static final String LOG_AFTER_INIT = "Logged from background thread run after init has finished";
-
- @Override
- protected void setup(VaadinRequest request) {
- log("Logged in init");
- Thread t = new Thread(new RunBeforeInitEnds());
- t.start();
- try {
- t.join();
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
- }
- new Thread(new RunAfterInit()).start();
- addComponent(new Button("Sync"));
- }
-
- class RunBeforeInitEnds implements Runnable {
- @Override
- public void run() {
- access(new Runnable() {
- @Override
- public void run() {
- log(LOG_DURING_INIT);
- }
- });
- }
- }
-
- class RunAfterInit implements Runnable {
- @Override
- public void run() {
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- access(new Runnable() {
- @Override
- public void run() {
- log(LOG_AFTER_INIT);
- }
- });
- }
- }
-
- @Override
- protected String getTestDescription() {
- return "Pusing something to a newly created UI should not cause race conditions";
- }
-
- @Override
- protected Integer getTicketNumber() {
- return Integer.valueOf(11529);
- }
-
-}