Buffer buff = TestUtils.randomBuffer(10000);
vertx.setPeriodic(1, id -> {
sock.write(buff.copy());
if (sock.writeQueueFull()) {
vertx.cancelTimer(id);
sock.drainHandler(v -> {
assertFalse(sock.writeQueueFull());
testComplete();
});
// Tell the server to resume
vertx.eventBus().send("server_resume", "");