~pbeaman/akiban-persistit/dynamic-volumes

« back to all changes in this revision

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

  • Committer: Peter Beaman
  • Date: 2013-04-29 21:18:24 UTC
  • mfrom: (374.37.18 stage)
  • Revision ID: pbeaman@akiban.com-20130429211824-ka4q0obrbg96hzu6
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
import org.junit.Test;
21
21
 
 
22
import com.persistit.Accumulator.SumAccumulator;
 
23
 
22
24
public class Bug920754Test extends PersistitUnitTestCase {
23
25
    /*
24
26
     * https://bugs.launchpad.net/akiban-persistit/+bug/920754
48
50
    public void testAccumumulatorTreeIsDeleted() throws Exception {
49
51
        final Exchange exchange = _persistit.getExchange("persistit", "Bug920754Test", true);
50
52
        final Transaction txn = _persistit.getTransaction();
51
 
        final Accumulator[] accumulators = new Accumulator[10];
 
53
        final SumAccumulator[] accumulators = new SumAccumulator[10];
52
54
        for (int i = 0; i < 10; i++) {
53
 
            accumulators[i] = exchange.getTree().getAccumulator(Accumulator.Type.SUM, 1);
 
55
            accumulators[i] = exchange.getTree().getSumAccumulator(1);
54
56
        }
55
57
        txn.begin();
56
58
        for (int i = 0; i < 10; i++) {
57
 
            accumulators[i].update(1, txn);
 
59
            accumulators[i].add(1);
58
60
        }
59
61
        txn.commit();
60
62
        txn.end();