David E Jones wrote: > [snip stuff about tests]
On that note, it has become my primary non-paid-work concern, to make the automated tests work out of the box. One idea that has been mentioned, is running each test in a transaction, then rolling it back at the end. This won't work, for several reasons. One, is that tests themselves may do multiple transaction things, even going so far as calling services that spawn separate transactions. Two, if the test calls commit, it actually won't, as it's running inside another transaction started by the test container. Another idea that has been mentioned, is using the EntityAuditLog feature. Since that only deals with single fields, it would need to be extended. One I had this morning, is to use Entity Data xml. Whenever the new entity is stored, save the old entity into a per-transaction based list. When the transaction status changes, either throw it away, or commit it. This would need to be extended to support deletes. And probably the simplest of all, is to save a copy of runtime/data/derby, then after each test, shutdown stuff, and copy the files back in. Preliminary testing shows that tarring up that dir, not compressing, then deleting and untarring is the fastest.