I'm using transaction in unit test with rollbackOnly=false so, I hope it is enought to commit data ;)
I'm suspecting some conflict between transaction from test and task execution and from automatic activities (java, mail and custom)...
I will try to reproduce it in a clean environment and if it does the same thing, I will send it to you.
Regards