Skip to content

Commit

Permalink
Merge pull request ceph#48014 from idryomov/wip-57116-cont
Browse files Browse the repository at this point in the history
test/{librbd, rgw}: increase delay between and number of bind attempts

Reviewed-by: Casey Bodley <[email protected]>
Reviewed-by: Laura Flores <[email protected]>
  • Loading branch information
idryomov authored Sep 8, 2022
2 parents 0cdd0c4 + 48016ea commit f4bb197
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/test/librbd/migration/test_mock_HttpClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class TestMockMigrationHttpClient : public TestMockFixture {

// 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++) {
Expand All @@ -105,7 +105,7 @@ class TestMockMigrationHttpClient : public TestMockFixture {
}
}
// backoff a little bit
usleep(retries * 10'000);
sleep(1);
}
m_server_port = m_acceptor->local_endpoint().port();
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/rgw/test_http_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace {

// 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;
Expand All @@ -50,7 +50,7 @@ namespace {
}
}
// backoff a little bit
usleep(retries * 10'000);
sleep(1);
}
return acceptor;
}
Expand Down

0 comments on commit f4bb197

Please sign in to comment.