]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix ceph_test_async_driver failed 4135/head
authorHaomai Wang <haomaiwang@gmail.com>
Sun, 22 Mar 2015 15:59:19 +0000 (23:59 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Sun, 22 Mar 2015 15:59:19 +0000 (23:59 +0800)
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

src/test/msgr/test_async_driver.cc

index 8dc84abb701cca6e490971a34edfcad9a7ec9e14..8c254c3d418a42baae1c84d2a8fa5f81d37c8fdd 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(sd);