From 28d61c8578679f7157a9624d2b1b4e4e6666f813 Mon Sep 17 00:00:00 2001 From: James Bloom <733179+jamesdbloom@users.noreply.github.com> Date: Mon, 23 Dec 2019 16:57:14 +0000 Subject: [PATCH] fixed test after tweaking nio event loop size --- .../mockserver/configuration/ConfigurationPropertiesTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mockserver-core/src/test/java/org/mockserver/configuration/ConfigurationPropertiesTest.java b/mockserver-core/src/test/java/org/mockserver/configuration/ConfigurationPropertiesTest.java index fd993d90e..579975d55 100644 --- a/mockserver-core/src/test/java/org/mockserver/configuration/ConfigurationPropertiesTest.java +++ b/mockserver-core/src/test/java/org/mockserver/configuration/ConfigurationPropertiesTest.java @@ -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()); @@ -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());