diff options
author | Leif Åstrand <leif@vaadin.com> | 2015-06-20 13:59:04 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-07-11 13:16:02 +0000 |
commit | 84daff0e39ca19d73255b60b0737742c3706dbfa (patch) | |
tree | e0bdf47c198bfbcbcf3b102a89c3e8d1e22d791d /uitest/src/com/vaadin/tests/components/AbstractTestUI.java | |
parent | 3c811e29a79da46a8124239e69ec473ad3dafcde (diff) | |
download | vaadin-framework-84daff0e39ca19d73255b60b0737742c3706dbfa.tar.gz vaadin-framework-84daff0e39ca19d73255b60b0737742c3706dbfa.zip |
Make async remove check work without push (#12909)
Change-Id: Ie5843c7fb5bb6365ceef998206df69302046e686
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/AbstractTestUI.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/AbstractTestUI.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/AbstractTestUI.java b/uitest/src/com/vaadin/tests/components/AbstractTestUI.java index dba055a65a..98b0f63ce1 100644 --- a/uitest/src/com/vaadin/tests/components/AbstractTestUI.java +++ b/uitest/src/com/vaadin/tests/components/AbstractTestUI.java @@ -205,4 +205,18 @@ public abstract class AbstractTestUI extends UI { return getSession().getBrowser(); } + /** + * Execute the provided runnable on the UI thread as soon as the current + * request has been sent. + */ + protected void runAfterResponse(final Runnable runnable) { + // Immediately start a thread that will start waiting for the session to + // get unlocked. + new Thread() { + @Override + public void run() { + accessSynchronously(runnable); + } + }.start(); + } } |