Package org.axonframework.integrationtests.commandhandling

Examples of org.axonframework.integrationtests.commandhandling.CreateStubAggregateCommand


    @Test(timeout = 60000)
    public void testConcurrentModifications() throws Exception {
        Log4jConfigurer.initLogging("classpath:log4j_silenced.properties");
        assertFalse("Something is wrong", CurrentUnitOfWork.isStarted());
        final UUID aggregateId = UUID.randomUUID();
        commandBus.dispatch(asCommandMessage(new CreateStubAggregateCommand(aggregateId)));
        final CountDownLatch cdl = new CountDownLatch(THREAD_COUNT);
        final CountDownLatch starter = new CountDownLatch(1);

        final AtomicInteger successCounter = new AtomicInteger();
        final AtomicInteger failCounter = new AtomicInteger();
View Full Code Here


     */
    @Test(timeout = 30000)
    public void testConcurrentModifications() throws Exception {
        assertFalse("Something is wrong", CurrentUnitOfWork.isStarted());
        final UUID aggregateId = UUID.randomUUID();
        commandBus.dispatch(asCommandMessage(new CreateStubAggregateCommand(aggregateId)));
        ExecutorService service = Executors.newFixedThreadPool(THREAD_COUNT);
        final AtomicLong counter = new AtomicLong(0);
        List<Future<?>> results = new LinkedList<Future<?>>();
        for (int t = 0; t < 30; t++) {
            results.add(service.submit(new Runnable() {
View Full Code Here

TOP

Related Classes of org.axonframework.integrationtests.commandhandling.CreateStubAggregateCommand

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.