tmf: Do not use Display.sleep in tests
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Thu, 11 Sep 2014 14:52:28 +0000 (10:52 -0400)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Fri, 12 Sep 2014 22:00:19 +0000 (18:00 -0400)
commit99c3a8781f85fcf43e0e442941f3ff7b643ca527
treef11681069f73c015c11c97dce8769f2571d69f78
parent30c7c7d51058828ff653267312f842fcce00802e
tmf: Do not use Display.sleep in tests

Similar to bug 415992 and change 25443. The display needs to be woken up
because it's possible to get in a state where nothing will wake up the UI
thread (events, messages), especially if the tests are being run unattended.
Instead of using the highly implementation-dependent solution of doing a
Display.asyncExec (which only works on Mac, not Windows), we can simply not put
the display to sleep and just have the thread sleep. This is safer because
Display.sleep by definition should not wake up until an event is received which
we cannot guarantee will happen.

Change-Id: Ib2282bcd71c9376d7bbdb084c094892146410ff7
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/33257
Tested-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
org.eclipse.linuxtools.lttng2.control.ui.tests/src/org/eclipse/linuxtools/lttng2/control/ui/tests/model/component/TraceControlTestFacility.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/views/uml2sd/loader/Uml2SDTestFacility.java
This page took 0.028271 seconds and 5 git commands to generate.