@Test
public void SocketAppender_should_retry_appending_until_get_connection() throws IOException, InterruptedException {

    server.shutdown();
    //We must restart server asynchronously because main thread will be stuck in reconnection
    Executors.newScheduledThreadPool(1).schedule(() -> server.start(), 1000, TimeUnit.MILLISECONDS);
    SocketAppender appender = new SocketAppender(new FixedConnection("localhost", 8080));
    appender.append(randomByteArray(200));
    AsyncTestHelper.tryDuring(2000, () -> server.verifyReceiveMsg());
}