You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Rick Hillegas <Ri...@Sun.COM> on 2010/02/16 18:24:54 UTC
JUnit-based concurrency tests
I would like to write a JUnit test which creates N threads (connections)
and has all of them run the same test case simultaneously. I see that
there is related machinery (JDBCPerfTestCase) which runs M iterations of
the same test case. Before I re-invent the wheel, I wanted to see
whether there is already a base class for what I want to do.
Thanks,
-Rick
Re: JUnit-based concurrency tests
Posted by Bryan Pendleton <bp...@amberpoint.com>.
> I'm not aware of any relevant existing base class in the Derby test
> framework for running multi-threaded tests.
I think that the classes and infrastructure in o.a.derbyTesting.perf.clients
have much to offer. They are not JUnit test cases, but they have a lot
of support for defining workloads, and managing threads, and tracking
increments and timings.
They are really more suited for running benchmarks, but hopefully
there is a lot of re-usable code there for developing concurrent tests.
thanks,
bryan
Re: JUnit-based concurrency tests
Posted by Kristian Waagan <Kr...@Sun.COM>.
On 16.02.10 18:24, Rick Hillegas wrote:
> I would like to write a JUnit test which creates N threads
> (connections) and has all of them run the same test case
> simultaneously. I see that there is related machinery
> (JDBCPerfTestCase) which runs M iterations of the same test case.
> Before I re-invent the wheel, I wanted to see whether there is already
> a base class for what I want to do.
>
Hi Rick,
I don't think JDBCPerfTestCase does what you want right now, it only
gives you the ability to run for a specified number of iterations /
series and then give you basic timing information.
You might want to check out JUnitPerf and GroboUtils to see if they can
easily be folded into our test framework. Especially the former looks
slim and easy enough to use, but I don't have any practical experience
with it.
I'm not aware of any relevant existing base class in the Derby test
framework for running multi-threaded tests.
Regards,
--
Kristian
> Thanks,
> -Rick