diff options
author | Henrik Paul <henrik@vaadin.com> | 2013-10-01 10:27:12 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-10-01 07:45:53 +0000 |
commit | 2bbb36705385f7c1bafce7eb527d5e66875b689c (patch) | |
tree | 55efb465d8c9907c8ea8f4839cbd57551147246a /server | |
parent | c18b20050d6b04a2c69b3fdfc75ca901b78edc0a (diff) | |
download | vaadin-framework-2bbb36705385f7c1bafce7eb527d5e66875b689c.tar.gz vaadin-framework-2bbb36705385f7c1bafce7eb527d5e66875b689c.zip |
Moved test class to appropriate source folder (#12337)
Change-Id: I01b25109a487bd0b9ff6a7903564ee5c867d6a33
Diffstat (limited to 'server')
-rw-r--r-- | server/tests/src/com/vaadin/tests/server/component/table/TableRemovedQuicklySendsInvalidRpcCalls.java | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/server/tests/src/com/vaadin/tests/server/component/table/TableRemovedQuicklySendsInvalidRpcCalls.java b/server/tests/src/com/vaadin/tests/server/component/table/TableRemovedQuicklySendsInvalidRpcCalls.java deleted file mode 100644 index b539e42efe..0000000000 --- a/server/tests/src/com/vaadin/tests/server/component/table/TableRemovedQuicklySendsInvalidRpcCalls.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2000-2013 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.server.component.table; - -import com.vaadin.annotations.Push; -import com.vaadin.event.ItemClickEvent; -import com.vaadin.event.ItemClickEvent.ItemClickListener; -import com.vaadin.server.VaadinRequest; -import com.vaadin.tests.components.AbstractTestUI; -import com.vaadin.ui.Button; -import com.vaadin.ui.Button.ClickEvent; -import com.vaadin.ui.Table; - -@Push -public class TableRemovedQuicklySendsInvalidRpcCalls extends AbstractTestUI { - - @Override - protected void setup(VaadinRequest request) { - addComponent(new Button("Blink a table", new Button.ClickListener() { - @Override - public void buttonClick(ClickEvent event) { - blinkTable(); - } - })); - } - - private void blinkTable() { - final Table table = new Table(); - table.setPageLength(5); - table.addContainerProperty(new Object(), String.class, null); - - for (int i = 0; i < 50; i++) { - table.addItem(new Object[] { "Row" }, new Object()); - } - - table.addItemClickListener(new ItemClickListener() { - private int i; - - @Override - public void itemClick(ItemClickEvent event) { - /* - * Ignore implementation. This is only an easy way to make the - * client-side update table's variables (by furiously clicking - * on the table row. - * - * This way, we get variable changes queued. The push call will - * then remove the Table, while the variable changes being still - * in the queue, leading to the issue as described in the - * ticket. - */ - System.out.println("clicky " + (++i)); - } - }); - - System.out.println("adding component"); - addComponent(table); - - new Thread() { - @Override - public void run() { - getSession().lock(); - try { - Thread.sleep(500); - access(new Runnable() { - @Override - public void run() { - System.out.println("removing component"); - removeComponent(table); - } - }); - } catch (InterruptedException e) { - e.printStackTrace(); - } finally { - getSession().unlock(); - } - }; - }.start(); - } - - @Override - protected String getTestDescription() { - return "Adding and subsequently quickly removing a table " - + "should not leave any pending RPC calls waiting " - + "in a Timer. Issue can be reproduced by " - + "1) pressing the button 2) clicking furiously " - + "on a row in the table."; - } - - @Override - protected Integer getTicketNumber() { - return 12337; - } -} |