]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
test/{librbd, rgw}: retry when bind fail with port 0 47980/head
authorKefu Chai <tchaikov@gmail.com>
Sun, 4 Sep 2022 12:37:32 +0000 (20:37 +0800)
committerKefu Chai <tchaikov@gmail.com>
Tue, 6 Sep 2022 00:45:10 +0000 (08:45 +0800)
commitfc8d4c8bb28375165b69b12e26abc2b38c16c64f
tree94288e3aaf269c16aa2b5a54b2158f8ebff8f847
parent188622a1c072d1602216503ea0f058be2ea7e4d0
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)
src/test/librbd/migration/test_mock_HttpClient.cc
src/test/rgw/test_http_manager.cc