Using a new module.

This commit is contained in:
Ali Dehghani
2019-11-25 22:09:20 +03:30
parent 8ae52459ad
commit 9cd0080706
2 changed files with 14 additions and 4 deletions

View File

@@ -1,7 +1,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung</groupId>
<artifactId>core-java-concurrency-advanced-3</artifactId>
<version>0.1.0-SNAPSHOT</version>
<name>core-java-concurrency-advanced-3</name>
@@ -15,6 +17,12 @@
</parent>
<dependencies>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
@@ -28,6 +36,7 @@
</build>
<properties>
<assertj.version>3.14.0</assertj.version>
</properties>
</project>

View File

@@ -96,7 +96,8 @@ public class SaturationPolicyUnitTest {
ThreadPoolExecutor executor = new ThreadPoolExecutor(1, 1, 0, MILLISECONDS, new LinkedBlockingQueue<>());
executor.shutdownNow();
assertThatThrownBy(() -> executor.execute(() -> {})).isInstanceOf(RejectedExecutionException.class);
assertThatThrownBy(() -> executor.execute(() -> {
})).isInstanceOf(RejectedExecutionException.class);
}
@Test