DESCRIPTION

[rfc] tests for reading and writing to a state system "simultaneously"

This fails and I believe needs to be fixed on the state system side.

Change-Id: I256731c7ca8e2aaa1727af3d5dda007175282493
Signed-off-by: Ivy Mitchell xxx@xxx.xxx


COMMENTS

author: Ivy Mitchell
date: 2014-01-22 19:55:00.000000000

Uploaded patch set 10.

-------------------------------------
author: Brenden Conley
date: 2014-01-22 19:55:05.000000000

Patch Set 10:

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

-------------------------------------
author: Brenden Conley
date: 2014-01-22 20:15:09.000000000

Patch Set 10: Verified-1

Build Failed 

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

-------------------------------------
author: Brenden Conley
date: 2014-01-22 21:23:00.000000000

Patch Set 10: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2014-01-22 21:58:06.000000000

Patch Set 10: Verified+1

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2014-01-23 05:49:03.000000000

Patch Set 10: Code-Review-1

(3 comments)

It's slowly coming together! *coming-together-hand-gesture*

The main abstract test class should have xxx@xxx.xxx methods. That way you end up with many tests for each of the sub-classes (n * m, instead of being n*1 or 1*m).

About the packaging, "functional" should not be in the package name. If we ever do the distinction unit/functional tests, it could be separate source directories altogether (so it's easy to run one target, or both). The state system tests here could go in tmf.core.tests.statesystem.live for example.

The BlockingTrace (now with tests, thanks) should be in its own package, perhaps next to CtfTmfTestTrace. That way in can be re-used for other live tests.

Finally while these tests are useful, they don't release test the "live" aspect. You insert states, then wait for everything to sync, then do queries, then insert states again.

Like I said, it's good, but a real live tests should have one thread doing the building, and separate thread(s) doing queries at the same time. This would allow catching issues like https://git.eclipse.org/r/#/c/20984/ , which would go undetected by the current test method. Perhaps something to keep in mind for the next series.

Line:93, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/functional/readingwhilewrite/ReadWhileWritingTest.java -> method name should not start with a capital

Line:115, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/functional/readingwhilewrite/ReadWhileWritingTest.java -> This could be xxx@xxx.xxx method.

That way, the test* methods below could be xxx@xxx.xxx methods. So if one part fail, it's easier to see in the report which part did.

I'm not a big fan of fitting everything into one test method to respect the sequence. You could rebuild the tree many times, once for each test. These are test methods, they can afford to be inefficient.

Line:174, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/functional/readingwhilewrite/ReadWhileWritingTest.java -> Would be better to have an expected exception

 xxx@xxx.xxx

so it could be put in a xxx@xxx.xxx in that case.

-------------------------------------
author: Braxton Mccarthy
date: 2014-01-24 23:12:29.000000000

Patch Set 10:

(1 comment)

Line:189, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/functional/readingwhilewrite/ReadWhileWritingTest.java -> this should be a void method that you call directly, instead of wrapping into another assertEquals. That way on the report we'll know exactly which of the checks below failed.

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