Skip to content

Commit

Permalink
fixed test after tweaking nio event loop size
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdbloom committed Dec 23, 2019
1 parent 742391d commit 28d61c8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void restoreProperties() throws IOException {
public void shouldSetAndReadNIOEventLoopThreadCount() {
// given
System.clearProperty("mockserver.nioEventLoopThreadCount");
int eventLoopCount = Math.max(1, SystemPropertyUtil.getInt("io.netty.eventLoopThreads", NettyRuntime.availableProcessors() * 5));
int eventLoopCount = Math.max(10, SystemPropertyUtil.getInt("io.netty.eventLoopThreads", NettyRuntime.availableProcessors()));

// when
assertEquals(eventLoopCount, ConfigurationProperties.nioEventLoopThreadCount());
Expand All @@ -68,7 +68,7 @@ public void shouldSetAndReadNIOEventLoopThreadCount() {
public void shouldHandleInvalidNIOEventLoopThreadCount() {
// given
System.setProperty("mockserver.nioEventLoopThreadCount", "invalid");
int eventLoopCount = Math.max(1, SystemPropertyUtil.getInt("io.netty.eventLoopThreads", NettyRuntime.availableProcessors() * 5));
int eventLoopCount = Math.max(10, SystemPropertyUtil.getInt("io.netty.eventLoopThreads", NettyRuntime.availableProcessors()));

// then
assertEquals(eventLoopCount, ConfigurationProperties.nioEventLoopThreadCount());
Expand Down

0 comments on commit 28d61c8

Please sign in to comment.