Made the test more robust.

This commit is contained in:
Simone Bordet 2016-10-17 15:34:08 +02:00
parent 6adfc324ad
commit f305bf8a2d
1 changed files with 3 additions and 0 deletions

View File

@ -83,6 +83,9 @@ public class ConnectionStatisticsTest extends AbstractTest
// Close all connections.
stop();
// Give some time to process the stop event.
Thread.sleep(1000);
Assert.assertThat(serverStats.getConnectionsMax(), Matchers.greaterThan(0L));
Assert.assertThat(serverStats.getReceivedBytes(), Matchers.greaterThan(contentLength));
Assert.assertThat(serverStats.getSentBytes(), Matchers.greaterThan(contentLength));