Issue 41 in warp-persist: Support for rollback-only transactions for unit testing

12 views
Skip to first unread message

codesite...@google.com

unread,
Oct 13, 2010, 5:58:38 AM10/13/10
to warp...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 41 by tomas.varaneckas: Support for rollback-only transactions
for unit testing
http://code.google.com/p/warp-persist/issues/detail?id=41

Currently there is no support for rollback only transactions, so unit tests
are committing data to db. The provided patch makes warp-persist
Transactional annotation get a new property:

@Test
@Transactional(rollbackOnly=true)
public void testSomething() throws Exception {
//do database manipulation
}

After method is executed, changes will be rolled back.
P.S. The patch introduced some additional source formatting due to my IDE
settings, sorry for that.


Attachments:
rollbackonly.diff 31.4 KB
warp-persist-2.0-20101013.jar 503 KB
warp-persist-2.0-20101013-src.jar 100 KB

codesite...@google.com

unread,
Oct 13, 2010, 7:06:08 AM10/13/10
to warp...@googlegroups.com

Comment #1 on issue 41 by dhanji: Support for rollback-only transactions

Hi, thanks for the contribution. Warp-persist has now been superseded by
Guice-persist. Any chance you can contribute it there?

codesite...@google.com

unread,
Oct 13, 2010, 7:10:09 AM10/13/10
to warp...@googlegroups.com

Comment #2 on issue 41 by tomas.varaneckas: Support for rollback-only

Sure, I'll take a look at it and post a new patch there in a while.

codesite...@google.com

unread,
Oct 13, 2010, 7:29:13 AM10/13/10
to warp...@googlegroups.com

Comment #3 on issue 41 by tomas.varaneckas: Support for rollback-only

Here's the patch for Guice-persist:
http://code.google.com/p/google-guice/issues/detail?id=551

Reply all
Reply to author
Forward
0 new messages