Are there any guidelines for testing multi-threaded code (other than throwing a bunch of threads at the problem and crossing your fingers).
I'm basically looking for good ways to test for data corruption, deadlocks, and other concurrency issues. Essentially I want to be able to prove that the code is thread-safe via a test.
Are there any frameworks in Java that let you easily write tests for a multithreaded scenario?