]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/{librbd, rgw}: retry when bind fail with port 0
authorKefu Chai <tchaikov@gmail.com>
Sun, 4 Sep 2022 12:37:32 +0000 (20:37 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 8 Sep 2022 19:18:21 +0000 (21:18 +0200)
commit9556c087e63721d1cfd29be0554d8497d55074d2
tree6421c6d49d222cc5a579002b93c431e47a410aaa
parentb2b80306dfbe8227629ed1f5fbe82d855a3b1e8a
test/{librbd, rgw}: retry when bind fail with port 0

there is chance that the bind() call may fail if we have another test
happen to pick the free port picked by operating system. in this case,
we just retry up to 42 times.

in theory, this change does not fully address the racing, but it should
help to alleviate this issue.

See-also: https://tracker.ceph.com/issues/57116
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit aa7885f7cc41390fcc8eeb82bc7142c3ff6a53f9)

Conflicts:
src/test/rgw/test_http_manager.cc [ commit f5019d2a8388 ("rgw:
  Set CURLOPT_NOBODY for HEAD request") not in pacific ]
src/test/librbd/migration/test_mock_HttpClient.cc
src/test/rgw/test_http_manager.cc