I posted this as a bug, but I figured I would post it here as well in the hope that someone would have figured out a work-around to this problem. I'm quite vexed.
I would have preferred to develop a test case that I could repeat, but this problem is giving me enough of a headache, that I thought I would file it. We have a project set up with unit testing. Because of the nature of the legacy code, I use a parallel hierarchy with the same package name to build my test cases in. This way I have access to package protected methods and constants.
src/app/dataStorage is the name of the pacakge with the production code.
src/utest/app/dataStorage is the name of the unit tests.
My project path is src.
I have set up my classpath's to use compile to multiple output directories. I created an output path that looks like:
src/bin (I know..Kind of weird, but there are other reasons for this).
and then I defined the output directories for my two source path's.
src -> src
src/utest -> src/utest
What I really want to do is compile to sources, but I have never been able to get that to work.
Now. This works great for a while. But suddently, IDEA will start compiling the unit tests into the wrong output directory. Specifically, I find my .class files for my unit tests appearing in src/app/dataStorage. Of course, my classpath is set up to find utest first, and since it used to work, it picks up the old .class files, and the updates don't take hold.
To fix it, I quit IDEA, and then using our command line build process do a make clean ; make. I restart IDEA, and everything works great.
This is very irritating, and I am in the process of trying to deploy unit testing among my group. While I am sure I can live with it, I am almost certain that the lack of a stable platform from which to run unit tests will almost guarantee their demise.