* upgrade to spring boot 1.5.2
* add full update to REST API
* modify ratings controller
* upgrade herold
* fix integration test
* fix integration test
* minor fix
* fix integration test
* fix integration test
* minor cleanup
* minor cleanup
* remove log4j properties
* use standard logbook.xml
* remove log4j dependencies
* remove commons-logging
* merge
* fix conflict
* exclude commons-logging dependency
* cleanup
* minor fix
* minor fix
* fix dependency issues
* Revert "fix dependency issues"
This reverts commit 83bf1f9fd2.
* fix dependency issues
* minor fix
* minor fix
* minor fix
* cleanup generated files
* fix commons-logging issue
* add parent to pom
* cleanup parent dependencies
* cleanup pom
* cleanup pom
* add missing parent
* fix logging issue
* fix test names
27 lines
789 B
Java
27 lines
789 B
Java
package com.baeldung.mdc.log4j;
|
|
|
|
import java.util.concurrent.ExecutorService;
|
|
import java.util.concurrent.Executors;
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
import org.junit.Test;
|
|
|
|
import com.baeldung.mdc.TransactionFactory;
|
|
import com.baeldung.mdc.Transfer;
|
|
|
|
public class DemoIntegrationTest {
|
|
|
|
@Test
|
|
public void main() throws InterruptedException {
|
|
ExecutorService executor = Executors.newFixedThreadPool(3);
|
|
TransactionFactory transactionFactory = new TransactionFactory();
|
|
for (int i = 0; i < 10; i++) {
|
|
Transfer tx = transactionFactory.newInstance();
|
|
Runnable task = new Log4JRunnable(tx);
|
|
executor.submit(task);
|
|
}
|
|
executor.shutdown();
|
|
executor.awaitTermination(60, TimeUnit.SECONDS);
|
|
}
|
|
}
|