Fixed flakyness of GracefulShutdownTest by explicitly setting the Connector shutdownIdleTimeout to a large value that does not interfere with the tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2022-11-09 12:13:27 +01:00
parent 793bee9e14
commit f21fa6e6e9
No known key found for this signature in database
GPG Key ID: 1677D141BCF3584D
1 changed files with 9 additions and 0 deletions

View File

@ -44,6 +44,15 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class GracefulShutdownTest extends AbstractTest
{
@Override
protected void start(ServerSessionListener listener) throws Exception
{
super.start(listener);
// Don't let the default shutdown idleTimeout
// of just 1000 ms interfere with the test.
connector.setShutdownIdleTimeout(15000);
}
@Test
public void testGracefulShutdownWhileIdle() throws Exception
{