From: Haomai Wang Date: Sun, 22 Mar 2015 15:59:19 +0000 (+0800) Subject: Fix ceph_test_async_driver failed X-Git-Tag: v0.94.2~47 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8a58d83b0d039d2c2be353fee9c57c4e6181b662;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(cherry picked from commit cd11daa2d21b7b059df9877cad38432678bb6161) --- diff --git a/src/test/msgr/test_async_driver.cc b/src/test/msgr/test_async_driver.cc index d666ac69985..acb1c0edcfd 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(::socket(AF_INET, SOCK_STREAM, 0));