From: Haomai Wang Date: Sun, 22 Mar 2015 15:59:19 +0000 (+0800) Subject: Fix ceph_test_async_driver failed X-Git-Tag: v9.0.0~120^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cd11daa2d21b7b059df9877cad38432678bb6161;p=ceph.git Fix ceph_test_async_driver failed This test will create 10000 sockets which will failed because of limited system fd. Actually we only need to create several hundreds sockets and it's enough to get the test's goal. Fix bug #11198 --- diff --git a/src/test/msgr/test_async_driver.cc b/src/test/msgr/test_async_driver.cc index 8dc84abb701..8c254c3d418 100644 --- a/src/test/msgr/test_async_driver.cc +++ b/src/test/msgr/test_async_driver.cc @@ -250,7 +250,7 @@ TEST(EventCenterTest, FileEventExpansion) { EventCenter center(g_ceph_context); center.init(100); EventCallbackRef e(new FakeEvent()); - for (int i = 0; i < 10000; i++) { + for (int i = 0; i < 300; i++) { int sd = ::socket(AF_INET, SOCK_STREAM, 0); center.create_file_event(sd, EVENT_READABLE, e); sds.push_back(sd);