more robust accept spin test

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2018-03-06 15:39:19 +11:00
parent 2291d12b87
commit 87bd4e8730
1 changed files with 2 additions and 2 deletions

View File

@ -255,7 +255,7 @@ public class ServerConnectorTest
try (StacklessLogging stackless = new StacklessLogging(AbstractConnector.class))
{
AtomicLong spins = new AtomicLong();
ServerConnector connector = new ServerConnector(server)
ServerConnector connector = new ServerConnector(server,1,1)
{
@Override
public void accept(int acceptorID) throws IOException
@ -267,7 +267,7 @@ public class ServerConnectorTest
server.addConnector(connector);
server.start();
Thread.sleep(1000);
Thread.sleep(1500);
assertThat(spins.get(), Matchers.lessThan(5L));
}
finally