DESCRIPTION

TMF: Added a method in UI tests to delay main thread until trace is opened

In o.e.l.tmf.ui.tests, the main thread often need to be put to sleep while a
trace element is being opened. The sleep time was put to 500 ms because that's
what showed best results. But sometimes, unit tests fail because it takes a bit
more than that. Instead of putting longer delays, we loop a certain number of
times until the trace is opened or after a certain timeout.

Change-Id: I662d951115eacbb3fa5b17cfe534a8e5c2a85eb4
Signed-off-by: Aryana Jones xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-12-18 22:06:26.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/4773/

-------------------------------------
author: Brenden Conley
date: 2013-12-18 22:15:53.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/4773/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2013-12-18 22:35:41.000000000

Patch Set 1: -Verified

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/4775/

-------------------------------------
author: Ivy Mitchell
date: 2013-12-18 22:52:43.000000000

Patch Set 1: Code-Review-1

(2 comments)

I really like this patch, but I feel adding a fail to the wait would be a nice plus.

Line:212, lttng/org.eclipse.linuxtools.tmf.ui.tests/shared/org/eclipse/linuxtools/tmf/ui/tests/shared/ProjectModelTestData.java -> why use this instead of traceEleement.getTrace() and save a line?

Line:221, lttng/org.eclipse.linuxtools.tmf.ui.tests/shared/org/eclipse/linuxtools/tmf/ui/tests/shared/ProjectModelTestData.java -> we should have a throw new TimeoutException or something if the program timeouts before the trace is opened. That will help bug hunting.

-------------------------------------
author: Ivy Mitchell
date: 2013-12-18 22:52:59.000000000

Patch Set 1: IP-Clean+1

-------------------------------------
author: Brenden Conley
date: 2013-12-18 23:09:21.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/4775/ : SUCCESS

-------------------------------------
