Idea: run tests in transactions, roll them back
Moritz Lenz <[email protected]> Fri, 5 Jun 2015 10:08:32 +0200
| Newsgroups | gmane.comp.otrs.devel |
|---|---|
| Message-ID | <[email protected]> |
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 _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
smime.p7s
(application/x-pkcs7-signature, 6.2 KB) - not displayed