Starting a few days ago my apex class compilation time suddenly ground to a halt. After going into the setup deployment monitoring I was at first delighted with the new deployment monitoring UI, then dismayed when I saw it was running 200+ tests to compile my apex class. Thinking it might be a maven's mate bugs I dug into the bowels and confirmed it's doing the deployment with the following options:
- checkOnly = false
- rollbackOnError = true
- runAllTests = false
- runTests = 
- purgeOnDelete = false
Strangely, after canceling the deployment several times it switched back to not running tests when I deployed. Unfortunately the next class I moved to exhibited the same issue, only a different set of tests. Even stranger, it failed out my deploy when an unrelated test failed.
If I'm working on a sandbox, using api version 29 for the deployments, and the v29 metadata api, with deploy options that don't imply any tests should be run, seems like this shouldn't be happening.
I've scoured the spring and winter '14 release notes and couldn't find any mentioned of altered testing behavior (although admittedly it's pretty easy to get lost in them). Is anyone aware of what might be causing this and what options I have to work around them? Seems like the metadata api is ignoring the parameters and instead running all tests the reference a class, but only in certain instances ...