~pbeaman/akiban-persistit/fix-hard-commit-infinite-loop

« back to all changes in this revision

Viewing changes to src/test/java/com/persistit/TransactionTest2.java

merge pbeaman: Fixes bug 1032701 - Interrupt causes Thread to exit without releasing claims.

https://code.launchpad.net/~pbeaman/akiban-persistit/fix-1032701-interrupts-leave-latches/+merge/118253

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
    final static CommitPolicy policy = CommitPolicy.SOFT;
50
50
 
51
 
    final static long TIMEOUT = 20000; // seconds
 
51
    final static long TIMEOUT = 20000; // 20 seconds
52
52
 
53
53
    static int _threadCount = 8;
54
54
    static int _iterationsPerThread = 25000;
222
222
        assertTrue("ATC has very old transaction",
223
223
                ti.getActiveTransactionCeiling() - ti.getActiveTransactionFloor() < 10000);
224
224
    }
 
225
    
 
226
    @Test(expected = IllegalStateException.class)
 
227
    public void illegalStateExceptionOnRollback() throws Exception {
 
228
        Transaction txn = _persistit.getTransaction();
 
229
        txn.rollback();
 
230
        txn.begin();
 
231
    }
 
232
 
 
233
    @Test(expected = IllegalStateException.class)
 
234
    public void illegalStateExceptionOnCommit() throws Exception {
 
235
        Transaction txn = _persistit.getTransaction();
 
236
        txn.commit();
 
237
        txn.begin();
 
238
    }
225
239
 
226
240
    public void runIt() {
227
241
        try {