Re: bug in test of 2.6
David Niehaus <[email protected]> Mon, 22 Oct 2012 08:25:57 +0200
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <[email protected]> |
Hi everybody,
regarding the failed test in the test package I had a look at RollbackTest class and did the following changes to make it pass the test.
There are more failed tests. Is this work helpful to you or is sth wrong with my set up causing the test failures.
Thanks David
public void testRollback() throws Exception {
testRollback(PrevaylerFactory.createPrevayler(new AppendingSystem(), _testDirectory));
testRollback(PrevaylerFactory.createTransientPrevayler(new AppendingSystem()));
}
private void testRollback(Prevayler<AppendingSystem> prevayler) throws Exception {
_prevayler = prevayler;
append("a", "a");
try {
append("rollback", "ignored");
fail("RuntimeException expected and not thrown.");
} catch (RuntimeException rx) {
}
//--------------------------------------------------------
// CHANGE HERE
append("b", "arollbackb");
//--------------------------------------------------------
_prevayler.close();
}
private void append(String appendix, String expectedResult) throws Exception {
_prevayler.execute(new Appendix(appendix));
assertEquals(expectedResult, system().value());
}
private AppendingSystem system() {
return _prevayler.prevalentSystem();
}
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
_______________________________________________
"Databases in Memoriam" -- http://www.prevayler.org