]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix ceph_test_async_driver failed
authorHaomai Wang <haomaiwang@gmail.com>
Sun, 22 Mar 2015 15:59:19 +0000 (23:59 +0800)
committerSage Weil <sage@redhat.com>
Tue, 21 Apr 2015 20:14:54 +0000 (13:14 -0700)
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)

src/test/msgr/test_async_driver.cc

index d666ac69985f468e47b98a57948e0ef140d3bbe2..acb1c0edcfdf94e9e62078f360be564d5ab78834 100644 (file)
@@ -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));