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)
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));