Package com.insightfullogic.slab.issue13

Source Code of com.insightfullogic.slab.issue13.Issue13Test

package com.insightfullogic.slab.issue13;

import org.junit.Test;

import com.insightfullogic.slab.Allocator;

public class Issue13Test {

    @SuppressWarnings("rawtypes")
    @Test
    public void reproduceIssue() {
        int reps = 100;
        Allocator eventAllocator = Allocator.of(SlabOperation.class);
        final SlabOperation op = (SlabOperation) eventAllocator.allocate(reps);
        for (int i = 0; i < reps; i++) {
          op.move(1);

          op.setMagic((byte) 0x80);
          op.setOpCode((byte) 0x09);
          op.setKeyLength((short) 3);
          op.setExtraLength((byte) 0);
          op.setDataType((byte) 0);
          op.setReserved((short) 0);
          op.setBodySize(3);
          op.setOpaque(0);
          op.setCas(0);
        }
    }

}
TOP

Related Classes of com.insightfullogic.slab.issue13.Issue13Test

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.