Package org.axonframework.repository

Examples of org.axonframework.repository.OptimisticLockManager$OptimisticLock


    }

    @Test(timeout = 60000)
    public void testOptimisticLocking() throws Throwable {
        // unfortunately, we cannot use @Before on the setUp, because of the TemporaryFolder
        initializeRepository(new OptimisticLockManager());
        long lastSequenceNumber = executeConcurrentModifications(CONCURRENT_MODIFIERS);
        assertTrue("Expected at least one successful modification. Got " + getSuccessfulModifications(),
                   getSuccessfulModifications() >= 1);
        int expectedEventCount = getSuccessfulModifications() * 2;
        assertTrue("It seems that no events have been published at all", lastSequenceNumber >= 0);
View Full Code Here


        verify(eventStore, times(3)).appendEvents(eq("CountingAggregate"), isA(DomainEventStream.class));
    }

    @Test
    public void testLoopBackKeepsProperEventOrder_OptimisticLocking() throws Throwable {
        initializeRepository(new OptimisticLockManager());
        EventListener el = new EventListener() {
            @Override
            public void handle(EventMessage event) {
                DomainEventMessage domainEvent = (DomainEventMessage) event;
                if (event.getPayload() instanceof CounterChangedEvent) {
View Full Code Here

        verify(eventStore, times(3)).appendEvents(eq("CountingAggregate"), isA(DomainEventStream.class));
    }

    @Test
    public void testLoopBackKeepsProperEventOrder_OptimisticLocking_ProcessingFails() throws Throwable {
        initializeRepository(new OptimisticLockManager());
        EventListener el = new EventListener() {
            @Override
            public void handle(EventMessage event) {
                DomainEventMessage domainEvent = (DomainEventMessage) event;
                if (event.getPayload() instanceof CounterChangedEvent) {
View Full Code Here

TOP

Related Classes of org.axonframework.repository.OptimisticLockManager$OptimisticLock

Copyright © 2018 www.massapicom. 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.