Commit
aa7885f7cc41 ("test/{librbd, rgw}: retry when bind fail with
port 0") reduced the frequency of sporadic unit test failures caused
by EADDRINUSE a lot, but not entirely.
Currently, it yields a cumulative sleep of ~9 seconds. Let's increase
that to 1 minute.
Fixes: https://tracker.ceph.com/issues/57116
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
// if we have a racing where another thread manages to bind and listen the
// port picked by this acceptor, try again.
- static constexpr int MAX_BIND_RETRIES = 42;
+ static constexpr int MAX_BIND_RETRIES = 60;
void create_acceptor(bool reuse) {
for (int retries = 0;; retries++) {
}
}
// backoff a little bit
- usleep(retries * 10'000);
+ sleep(1);
}
m_server_port = m_acceptor->local_endpoint().port();
}
// if we have a racing where another thread manages to bind and listen the
// port picked by this acceptor, try again.
- static constexpr int MAX_BIND_RETRIES = 42;
+ static constexpr int MAX_BIND_RETRIES = 60;
tcp::acceptor try_bind(boost::asio::io_context& ioctx) {
using tcp = boost::asio::ip::tcp;
}
}
// backoff a little bit
- usleep(retries * 10'000);
+ sleep(1);
}
return acceptor;
}