Hi all,
in order to isolate tests from each other, we could consider starting a
database transaction before running a test file, and then rolling back
the transaction after the test file finished running.
Then new objects (queues, users, groups, tickets) wouldn't need to be
cleaned up manually at the end of a test, and the cleanup would even
happen if a test aborts early.
However, it'd only work for tests that don't want to establish their own
DB connections, and not for tests that rely on inter-process
communication (those couldn't share a transaction).
Do you think this idea is worth pursuing?
(afaict all of the supported DBs implement transactions just fine,
except mysql on myisam, and DBI already provides a simple interface
($dbh->begin_work, $dbh->commit, $dbh->rollback)).
Cheers,
Moritz