Search in sources :

Example 1 with LongResponse

use of org.neo4j.test.LongResponse in project neo4j by neo4j.

the class SlaveTransactionCommitProcessTest method setUp.

@Before
public void setUp() {
    lastSeenEventIdentifier = new AtomicInteger(-1);
    master = mock(Master.class);
    requestContext = new RequestContext(10, 11, 12, 13, 14);
    reqFactory = new ConstantRequestContextFactory(requestContext) {

        @Override
        public RequestContext newRequestContext(int eventIdentifier) {
            lastSeenEventIdentifier.set(eventIdentifier);
            return super.newRequestContext(eventIdentifier);
        }
    };
    response = new LongResponse(42L);
    tx = new PhysicalTransactionRepresentation(Collections.<StorageCommand>emptyList());
    tx.setHeader(new byte[] {}, 1, 1, 1, 1, 1, 1337);
    commitProcess = new SlaveTransactionCommitProcess(master, reqFactory);
}
Also used : Master(org.neo4j.kernel.ha.com.master.Master) LongResponse(org.neo4j.test.LongResponse) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) StorageCommand(org.neo4j.storageengine.api.StorageCommand) ConstantRequestContextFactory(org.neo4j.test.ConstantRequestContextFactory) RequestContext(org.neo4j.com.RequestContext) PhysicalTransactionRepresentation(org.neo4j.kernel.impl.transaction.log.PhysicalTransactionRepresentation) Before(org.junit.Before)

Aggregations

AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 Before (org.junit.Before)1 RequestContext (org.neo4j.com.RequestContext)1 Master (org.neo4j.kernel.ha.com.master.Master)1 PhysicalTransactionRepresentation (org.neo4j.kernel.impl.transaction.log.PhysicalTransactionRepresentation)1 StorageCommand (org.neo4j.storageengine.api.StorageCommand)1 ConstantRequestContextFactory (org.neo4j.test.ConstantRequestContextFactory)1 LongResponse (org.neo4j.test.LongResponse)1