Comment #1 on issue 11 by alasdair.mackintosh: Testing sub methods
https://code.google.com/p/thread-weaver/issues/detail?id=11
Hi Martin,
This is working as intended, although I agree that the documentation needs
to be clearer.
When you use the AnnotatedTestRunner, it looks at the method invoked by the
@ThreadedMain method, and tests that. So it adds a breakpoint at every line
in that method, and then lets the second thread run to completion. But it
doesn't add breakpoints at every line in every method called by the first
method. (So in this case we are only really testing
putIfAbsentNonDirect().) You can see this yourself if you
call 'runner.setDebug(true);' on the AnnotatedTestRunner.
Making the framework interleave at every point could get expensive. How
deep do you want to go? It might be possible to add this, but I am not sure
how useful this would be.
As an alternative, you probably want to look at breakpoints. You can
control where the first thread stops and the second thread runs.